ASP.Net using wrong web.config for virtual directory

  • Thread starter Thread starter Robin9876
  • Start date Start date
R

Robin9876

In IIS 7 I have created a web site which is located at C:\MyWebSite
and in IIS Manager created a virtual folder which points to C:
\MyVirtualFolder. The virtual folder was then converted to an
application using a separate application pool.

However when accessing the virtual folder URL in a web browser it
appears to be using the web.config of the root web site.

What needs to change to allow the web.config in the virtual directory
to be used?
 
Robin9876 said:
In IIS 7 I have created a web site which is located at C:\MyWebSite
and in IIS Manager created a virtual folder which points to C:
\MyVirtualFolder. The virtual folder was then converted to an
application using a separate application pool.

However when accessing the virtual folder URL in a web browser it
appears to be using the web.config of the root web site.

What needs to change to allow the web.config in the virtual directory
to be used?
I don't understand where C:\MyWebSite comes into it.
 
In IIS the web site's file location is C:\MyWebSite and then the
virtual directory was created in IIS on this web site with its file
location as C:\MyVirtualFolder\
 
I got this to work by adding the following (with a closing tag) to the
root web.config
<location path="." inheritInChildApplications="false">
 

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

Back
Top