Monday, March 26, 2012

Web Service directory

How do I get the (local) directory my web serice is running from?
Directory.GetCurrentDirectory() it returns the System32 directory. I'm
looking for the "C:\Inetpub\wwwroot\MyService\" directory. Thanks for any
help.There is a good listing of different paths you can examine on Rick
Strahl's blog:

http://west-wind.com/weblog/posts/269.aspx

I believe you are looking for Request.PhysicalPath.

HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 28 Apr 2005 23:20:23 -0400, "Jed Ozone" <jed ozone@.yahoo.com>
wrote:

>How do I get the (local) directory my web serice is running from?
>Directory.GetCurrentDirectory() it returns the System32 directory. I'm
>looking for the "C:\Inetpub\wwwroot\MyService\" directory. Thanks for any
>help.

0 comments:

Post a Comment