stop inheritance of web.config file

S

sachin bhangale

Hi,
I have virtual Directory in .NET 2.0 inside that I have virtual
Directory with .NET 1.1,
when I try to run the root web site it gives me error related to the
web.conging.
can any boby suggest me how to stop inheritance of web.config file in
sub directories.
thanks in advance.
 
G

Göran Andersson

sachin said:
Hi,
I have virtual Directory in .NET 2.0 inside that I have virtual
Directory with .NET 1.1,
when I try to run the root web site it gives me error related to the
web.conging.
can any boby suggest me how to stop inheritance of web.config file in
sub directories.
thanks in advance.

Your problem is that the virtual directory is not an application, it's
just a plain subdirectory.

In the IIS Manager, open the properties for the virtual directory. In
the Virtual Directory tab, under Application settings, click the Create
button.
 
J

Juan T. Llibre

re:
!> Your problem is that the virtual directory is not an application, it's just a plain subdirectory.

That's one possible answer.

Another answer is that, even if a subdirectory is configured
as an IIS application, it will inherit from the application's root.

What this means is that you cannot run a 1.1 app as a subapp of a 2.0 app,
or as an independent 1.1 App, as long as it's physically under a 2.0 App.

You can't mix .Net Frameworks within the same application.

You can run a simple test to confirm this.

1. Create a .Net 2.0 application
2. Now, configure a subdirectory of the .Net 2.0 application as a .Net 1.1 application.

You will find that found that, indeed, the 1.1 app balks at the 2.0
web.config configuration entries in the 2.0's app's web.config.

The reverse is also true.

You cannot run a 2.0 app as a subapp of a 1.1 app,
or as an independent 2.0 App, as long as it's physically under a 1.1 App.

In that case, the 2.0 app balks at the 1.1 web.config
configuration entries in the 1.1 "mother application" web.config.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
 

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,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top