How do I get the current directory in a web service
.net, asp.net, c#, iis, web-services
Solution
In a webservice, you are running in a http context. So,
HttpContext.Current.Server.MapPath("~/")
will give you the answer.
Problem
I am using System.IO.Directory.GetCurrentDirectory() to get the current directory in my web service, but that does not give me the current directory. How do I get the current directory in a web service? Thanks Stuart