MapPath and default web site

G

Guest

When the web site is not setup as the default then MapPath("virtname") returns the correct physical path for a virtual directory which has been setup.
However, when the web site is setup as the default web site then MapPath("virtname") doesn't return the correct physical
path.

For example,

http://localhost/mws/default.aspx

MapPath("virtdir") in this instance correctly returns "C:\mws\data"

Now I set this web site as the default and type

http://localhost/default.aspx

MapPath("virtdir") now incorrectly returns "C:\inetpub\wwwroot\mws\virtdir"

Any suggestions on how to get the correct location independent of whether the web site is default or not.

Steve
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top