By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,296 Members | 1,476 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,296 IT Pros & Developers. It's quick & easy.

Having Two web.config files under same site.

P: n/a
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
Apr 4 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Asela Gunawardena wrote:
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.

--
Craig
Microsoft MVP - ASP/ASP.NET
Apr 4 '06 #2

P: n/a
Craig Deelsnyder wrote:
Asela Gunawardena wrote:
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.

or, I should have mentioned the obvious; remove any 'invalid' config
sections that cannot be redefined in subfolders' web.configs...

--
Craig
Microsoft MVP - ASP/ASP.NET
Apr 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.