I have a windows service, which run through Network Service account. In this windows service, I have a method (c#) which call Microsoft.Web.Administration to get a physical path for a web application hosted on IIS 7 (win2k8 64bit server) :
Site site = serverManager.Sites["Default Web Site"];
Application
app = site.Applications["/MyVirDir"];
string
s = app.Path;
However, the windows service failed due to permission issue, changing windows service Identity to Local System made it work.
However, I am not allowed to raise security level on this windows service. Are there any other options to get physical path?
Thank you in advance