Having Two web.config files under same site.

  • Thread starter Asela Gunawardena
  • Start date
A

Asela Gunawardena

we have a web site which operates as a seperate application that can be
integrated with other webs site developped to use other platforms such as
php, jsp, etc. so obivously we have our own web.config file. But recently
this site was integrated with an ASP.NET site which dosenot allow us to have
our own web.config file. it says there is already a configurqtion section
called <enterpriselibrary> etc. where as both the sites uses microsoft data
application blocks for the data tier.
my question is what prevents us from using our own web.config ? because when
you configure an ASP web site as a seperate virtual directory in IIS under
the same site it tends to run as another application isn't it ? where as
this particular site dose not is there any particular reason for this.?

thankx in advance
Asela
 
C

Craig Deelsnyder

Asela said:
we have a web site which operates as a seperate application that can be
integrated with other webs site developped to use other platforms such as
php, jsp, etc. so obivously we have our own web.config file. But recently
this site was integrated with an ASP.NET site which dosenot allow us to have
our own web.config file. it says there is already a configurqtion section
called <enterpriselibrary> etc. where as both the sites uses microsoft data
application blocks for the data tier.
my question is what prevents us from using our own web.config ? because when
you configure an ASP web site as a seperate virtual directory in IIS under
the same site it tends to run as another application isn't it ? where as
this particular site dose not is there any particular reason for this.?

thankx in advance
Asela

The issue is that you probably have a web.config in 1 application's
folder but then also 1 or more .configs in its subfolders. Even tho you
try to set this up in IIS to have separate virtual directories, an app
domain for ASP.NET starts at a virtual directory and goes downward into
the file structure. So then it finds another web.config and as it
noted, you can't have more than 1 enterprise library config section.

Separate the apps out into separate file structures; use IIS to map them
virtually as tho they look like 1 site. That's what virtual directories
are for, to separate filesystem location from url location.
 
C

Craig Deelsnyder

Craig said:
The issue is that you probably have a web.config in 1 application's
folder but then also 1 or more .configs in its subfolders. Even tho you
try to set this up in IIS to have separate virtual directories, an app
domain for ASP.NET starts at a virtual directory and goes downward into
the file structure. So then it finds another web.config and as it
noted, you can't have more than 1 enterprise library config section.

Separate the apps out into separate file structures; use IIS to map them
virtually as tho they look like 1 site. That's what virtual directories
are for, to separate filesystem location from url location.
or, I should have mentioned the obvious; remove any 'invalid' config
sections that cannot be redefined in subfolders' web.configs...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top