stop inheritance of web.config file

  • Thread starter Thread starter sachin bhangale
  • Start date Start date
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.
 
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.
 
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/
=========================
 
Back
Top