Groups | Blog | Home
all groups > visual studio .net general > october 2007 >

visual studio .net general : (IIS6) Server.MapPath(strPath) - Bug 4 folders not under \inetpub\wwwroot?



10/31/2007 6:19:30 PM
Dear Readers,

good afternoon. i am trying to identify the physical path
programmatically when my server application drops a file inside c:
\MyServer\MyServerOutput folder. this folder at the lowest level is a
virutal directory called 'myserveroutput'. i get a file name:
http://localhost/myserveroutput/filename.mdb. when i parse out the
string in a web application residing in http://localhost/myapplication/default.aspx
and try to do a server.mappath(~/myserveroutput), it returns a non-
existing path of c:\inetpub\wwwroot\myapplication\myserveroutput
\filename.mdb instead of going after c:\MyServer\MyServerOutput
\filename.mdb.

i searched on the internet for server.mappath() results and all
examples talk about the web application folder and the data folder
being under the c:\inetpub\wwwroot.

the iis console sees my myserveroutput being present c:\myserver
\myserveroutput\ folder correctly. i am only surprised whether it is
a bug in server.map(strpath) folder for folders not under \inetput
\wwwroot.

thanks and regards
Ravi.
AddThis Social Bookmark Button