Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to start 2 copies of one application with different Web.Config file /connection strings/?

Posted on 2014-11-16
5
102 Views
Last Modified: 2014-11-23
Dear experts,

I’m professional programmer since 2000 years, but new to IIS7.5 administration and I need a little help.

I had an application in ASPX which do a specific business function and is started via URL call. It worked, but I want to start 2 different copies of this application – for example one to be called with

https://83.222.134.12/Demo2/calc/Default.aspx
and other with
https://83.222.134.12/Demo3/calc/Default.aspx

Actually I manage to make this, with virtual directories and with new application, but I need to have completely different web.config in which also there are connection strings that should use different database, BUT ARE WITH THE SAME NAME. Now I get error that

 Parser Error Message: The entry 'ASPData2' has already been added.

 How to do deal with this?
0
Comment
Question by:dvplayltd
  • 3
  • 2
5 Comments
 
LVL 80

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 40445726
Add a <clear /> element at the top of the connectionStrings node
0
 

Author Comment

by:dvplayltd
ID: 40447749
Thanks David, I already manage with this in other style - simple do not add at all this in root WEB.Config and add it only on web.config of applications. But your version is also very proper.

I'm ready to give you the points, just want to ask - for my case - I need a new application for every copies of applications, or new virtual directories ?

It look a new site is not proper, I want all different copies to be accessed via same IP while a new site require a new LAN card.

For my purpose is enoght to have 2 copies working under different pool that will grant me that a problem with one app do not affect other. I set this with new application.
0
 
LVL 80

Expert Comment

by:David Johnson, CD, MVP
ID: 40447807
an ip is one of 3 items that have to be unique per website, the other 2 are port and name. the second one can use a name of demo3 otherwise it would be under the default website and not a subdirectory you could then call them as
https://demo2/ and https://demo3  just add the 2 names  either to DNS or hosts file
0
 

Author Comment

by:dvplayltd
ID: 40447834
Ok, I can make this and like different sites. But did I get extra benefits from this? If it is equal in final result I think one website with many applications are OK? What do you think ??? What problems I may face with 1 site and many applications ?

I think I can stop one application /for maitaince/ while other is working, right ? This with different pool for every app seem to me enoght. Or I'm wrong?
0
 

Author Closing Comment

by:dvplayltd
ID: 40460818
10x
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question