473,395 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Multiple web.config files in a virtual directory

Is it possible to have multiple web.config files in a given virtual
directory in different directories? For example:

http://localhost/myapp (Virtual directory maps to C:\MyApp)
http://localhost/myapp/newFolder (web folder in the above virtual dir maps
to C:\MyApp\NewFolder)

Can I have one web.config file at C:\MyApp and another at
C:\MyApp\NewFolder? When I tried to do this, VS.NET web project (during
debugging) throws an errors saying that something is wrong at the server? So
I compiled the project and tried to bring to navigate to a page in the
browser (without debugging), I still get an error. But when I remove the
web.config file at C:\MyApp\NewFolder, it works fine.

Any help is appreciated.

Thanks.
Raghu/..
Nov 18 '05 #1
6 1834
yes, but you are limited what can be in the second one... usually thought
its better to have the ONE in the root and use the <location> tags to
explicitely handle things in the subfolders

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Raghu" <Ra***@nospamzzzqcsi.com> wrote in message
news:ui**************@TK2MSFTNGP12.phx.gbl...
Is it possible to have multiple web.config files in a given virtual
directory in different directories? For example:

http://localhost/myapp (Virtual directory maps to C:\MyApp)
http://localhost/myapp/newFolder (web folder in the above virtual dir maps
to C:\MyApp\NewFolder)

Can I have one web.config file at C:\MyApp and another at
C:\MyApp\NewFolder? When I tried to do this, VS.NET web project (during
debugging) throws an errors saying that something is wrong at the server? So I compiled the project and tried to bring to navigate to a page in the
browser (without debugging), I still get an error. But when I remove the
web.config file at C:\MyApp\NewFolder, it works fine.

Any help is appreciated.

Thanks.
Raghu/..

Nov 18 '05 #2
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ud**************@TK2MSFTNGP10.phx.gbl...
yes, but you are limited what can be in the second one... usually thought
its better to have the ONE in the root and use the <location> tags to
explicitely handle things in the subfolders


Curt, what are the limitations on the web.config in the subfolder?

The only limitation I'm aware of is an issue with assembly references if the
sub-folder is also an application. If the main web.config uses

<httpModules>
<add name="MyModule" type="MyNamespace.MyModule, MyAssembly" />
</httpModules>

Then the subapplication will be looking for a SubApp\bin\MyAssembly.dll. You
can add a <remove name="MyModule" /> to the sub-web.config, but it's already
too late - ASP.NET will be looking for MyAssembly.dll before it gets around
to processing your <remove>. The workaround is to place a dummy
MyAssembly.dll in SubApp\bin.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #3
Are you saying the SUB is flagged as an APP in VS?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ud**************@TK2MSFTNGP10.phx.gbl...
yes, but you are limited what can be in the second one... usually thought its better to have the ONE in the root and use the <location> tags to
explicitely handle things in the subfolders
Curt, what are the limitations on the web.config in the subfolder?

The only limitation I'm aware of is an issue with assembly references if

the sub-folder is also an application. If the main web.config uses

<httpModules>
<add name="MyModule" type="MyNamespace.MyModule, MyAssembly" />
</httpModules>

Then the subapplication will be looking for a SubApp\bin\MyAssembly.dll. You can add a <remove name="MyModule" /> to the sub-web.config, but it's already too late - ASP.NET will be looking for MyAssembly.dll before it gets around to processing your <remove>. The workaround is to place a dummy
MyAssembly.dll in SubApp\bin.
--
John Saunders
johnwsaundersiii at hotmail

Nov 18 '05 #4
oopss... I mean IIS, not VS

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ud**************@TK2MSFTNGP10.phx.gbl...
yes, but you are limited what can be in the second one... usually thought its better to have the ONE in the root and use the <location> tags to
explicitely handle things in the subfolders
Curt, what are the limitations on the web.config in the subfolder?

The only limitation I'm aware of is an issue with assembly references if

the sub-folder is also an application. If the main web.config uses

<httpModules>
<add name="MyModule" type="MyNamespace.MyModule, MyAssembly" />
</httpModules>

Then the subapplication will be looking for a SubApp\bin\MyAssembly.dll. You can add a <remove name="MyModule" /> to the sub-web.config, but it's already too late - ASP.NET will be looking for MyAssembly.dll before it gets around to processing your <remove>. The workaround is to place a dummy
MyAssembly.dll in SubApp\bin.
--
John Saunders
johnwsaundersiii at hotmail

Nov 18 '05 #5
I meant _if_ the sub is flagged as an app. The issue I raised only happens
if the sub is an app.
--
John Saunders
johnwsaundersiii at hotmail
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
oopss... I mean IIS, not VS

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ud**************@TK2MSFTNGP10.phx.gbl...
yes, but you are limited what can be in the second one... usually thought its better to have the ONE in the root and use the <location> tags to
explicitely handle things in the subfolders


Curt, what are the limitations on the web.config in the subfolder?

The only limitation I'm aware of is an issue with assembly references if

the
sub-folder is also an application. If the main web.config uses

<httpModules>
<add name="MyModule" type="MyNamespace.MyModule, MyAssembly" />
</httpModules>

Then the subapplication will be looking for a SubApp\bin\MyAssembly.dll.

You
can add a <remove name="MyModule" /> to the sub-web.config, but it's

already
too late - ASP.NET will be looking for MyAssembly.dll before it gets

around
to processing your <remove>. The workaround is to place a dummy
MyAssembly.dll in SubApp\bin.
--
John Saunders
johnwsaundersiii at hotmail


Nov 18 '05 #6
Ah, yes. IF it's an "app" then all bets are off.
If it's not there are some things, like the security model/type that can't
be "re-set" in a sub web.config, only once in the root one.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:O5*************@TK2MSFTNGP10.phx.gbl...
I meant _if_ the sub is flagged as an app. The issue I raised only happens
if the sub is an app.
--
John Saunders
johnwsaundersiii at hotmail
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
oopss... I mean IIS, not VS

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ud**************@TK2MSFTNGP10.phx.gbl...
> yes, but you are limited what can be in the second one... usually

thought
> its better to have the ONE in the root and use the <location> tags to > explicitely handle things in the subfolders

Curt, what are the limitations on the web.config in the subfolder?

The only limitation I'm aware of is an issue with assembly references
if the
sub-folder is also an application. If the main web.config uses

<httpModules>
<add name="MyModule" type="MyNamespace.MyModule, MyAssembly" />
</httpModules>

Then the subapplication will be looking for a
SubApp\bin\MyAssembly.dll. You
can add a <remove name="MyModule" /> to the sub-web.config, but it's

already
too late - ASP.NET will be looking for MyAssembly.dll before it gets

around
to processing your <remove>. The workaround is to place a dummy
MyAssembly.dll in SubApp\bin.
--
John Saunders
johnwsaundersiii at hotmail



Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Mike | last post by:
Looking to find any information on how to properly configure multiple instances of DB2. This is on Win2k db2 ver 7.2. I am basically looking for information on how the multiple instance settings...
6
by: Andrew Connell | last post by:
I have an app where I want virtually everything password protected/secure except for a single directory. That directory handles some custom authentication and contains my login form, but also some...
2
by: James X. Li | last post by:
Is there a way to implement multiple login forms for ASP.NET applications? With our application we want to implement simple login form for normal resources (downloadable files), but more rigorous...
5
by: BPearson | last post by:
Hello I would like to have several sites share a single web.config file. To accomplish this, I would point the root of these sites to the same folder. Is there any reason why I might not want to...
2
by: Sean | last post by:
I have an ASP.NET web application that needs to be rolled out to a number of clients. The functionality is the same in all applications, but each client has its own database. At the moment, I...
10
by: Wm. Scott Miller | last post by:
We have a intranet site that allows one of our departments to search a set of pdfs and then look at them. Only problem is that only they and us geeks should be allowed to see the pdfs. We have it...
5
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...
5
by: Sammy | last post by:
On a Windows 2003 Server machine that has multiple IIS web sites, how does one control which web site the new web application gets created under? Thank you, Sammy
3
by: | last post by:
I'm seeking (probably basic) guidance on the right way to split a large site that's supposed to represent one domain(mydomain.org) into many small VS.NET projects, and how to avoid issues with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.