473,657 Members | 2,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Having Two web.config files under same site.

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 <enterpriselibr ary> 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
2 5110
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 <enterpriselibr ary> 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
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 <enterpriselibr ary> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3821
by: Fuzzyman | last post by:
There have been a couple of config file 'systems' announced recently, that focus on building more powerful and complex configuration files. ConfigObj is a module to enable you to much more *simply* access config files. This is version 3, which is a big overhaul. It extends ConfigObj to reading config files with sections and various other simplifications. I find ConfigObj extremely easy to use and use it for reading config files and data...
10
2196
by: mike | last post by:
Is it possible to move the web.config out of the application folder? I would like it off somewhere out of the web directory
0
999
by: John Wallace | last post by:
Hi, I have an initial build of an ASP.NET/C# application (based around a "custom control" with some supporting webforms) that contains the usual mix of: 1) ASP files 2) A single DLL (containing all the classes and code-behind I believe) 3) A supporting folder structure 4) Some data/config files used by the app.
3
1711
by: Mads Brydegaard | last post by:
Hi, I have created a custom Config handler for reading a custom config section in my .config file(s) It works very well! I have placed a web.config in my root directory and then I use sub files in sub diretories overriding various settings in the config file. Very nice strategy which really makes it easy to customize generic applications.
5
10998
by: George | last post by:
Hi, Is it possible to specify the location of a web.config file in an ASP.NET application? I have one ASP.NET application which is to be hosted on 2 web sites in the same web server. I want to configure the 2nd web site as virtual directory so that the 2 web sites are pointing to the same application. However, there are different configuration settings for the 2 web sites, so that accessing these 2 sites' same ASP.NET application will...
8
1986
by: Robert | last post by:
I have what I think should be a pretty common scenario in a corporate environment. I have a web app and three environments on three servers: Development, QA and Production. We develop in development and then deploy the updated application to our QA server and then once tested to our production server. The application has a web.config file. The contents of the file (appsettings part) are different in all three environments because...
12
4738
by: Ben | last post by:
I have a group of settings that I'd like to have inherited by multiple sites. I'm trying this, but it's not working. wwwroot\group\web.config wwwroot\group\site1\web.config wwwroot\group\site2\web.config Where site1 & site2 are applications.
2
2509
by: Arpan | last post by:
What exactly are configuration section handlers in a web.config file? How would you define them & what for are they used in web.config files? Is it a must for web.config files to have handlers? An example of handlers in a web.config file would be highly appreciated. Thanks, Arpan
4
1916
by: Andy | last post by:
If I open, edit and save the web.config file directly on the webserver, the web server becomes unavailable. When I reset IIS, I get the 'Server Application Unavailable' message appear for that web site. The change being made was minor, and worked locally. Restarting IIS or the server has no affect. Deleting the Temporary ASP.NET files has no effect.
0
8402
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8315
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8608
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6172
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4164
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.