Avatar of dvplayltd
dvplayltd
Flag for Bulgaria asked on

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

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?
Microsoft IIS Web ServerASP.NET

Avatar of undefined
Last Comment
dvplayltd

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
David Johnson, CD

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
dvplayltd

ASKER
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.
David Johnson, CD

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
dvplayltd

ASKER
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?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
dvplayltd

ASKER
10x