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