ASP.Net using invalid web.config for virtual directory

We are running IIS 6 on Windows Server 2003 R2.

We want to add a virtual directory running under .NET 4.0 to a site under .NET. We provided the virtual directory with our own application pool, and we configured the virtual directory to work under 4.0.

The parent site works fine, but the virtual directory causes errors that reference the site’s parent web.config file. We need a virtual directory to use its own web.config file.

The GUI in IIS Manager says that the virtual directory uses its own web.config file, but the error messages we receive relate to the elements in the parent web.config file.

I am not sure how to solve the problem. My best result so far from a post on another site said that the problem could be solved with something like this:

<location path="." inheritInChildApplications="false"> </location> 

Again, I'm not sure if this will fix the situation, and I'm not sure how to determine where to put it or what it should contain. The parent site is built on top of the CMS system, and its web.config file is quite complex.

+4
source share
1 answer

I did it, so I want to leave an answer for the next person.

The location points that I mentioned in my question did the job. I made them work, using them to wrap up the system.web section:

 <location path="." inheritInChildApplications="false"> <system.web> . . (the stuff that made the site in the virtual directory break) . . </system.web> </location> 
+8
source

All Articles