ASP.Net using wrong web.config for virtual directory

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?
 
J

Joe Fawcett

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.
 
Joined
Nov 10, 2008
Messages
10
Reaction score
0
web.config should go in the physical folder C:\MyWebSite

Regardless of virtual folder name, web.config always goes to the physical one.

Khodr
 
Joined
Nov 10, 2008
Messages
10
Reaction score
0
web.config should go in the physical folder C:\MyWebSite

Regardless of virtual folder name, web.config always goes to the physical one.
 
R

Robin9876

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\
 
R

Robin9876

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top