You can retrieve the account a Web app/service is running under easily with:
[WebMethod()]
public string GetUserName()
{
return Environment.UserName
}
or in an ASPX page:
< % = Environment.UserName %>
By default this will be NETWORK SERVICE (or ASPNET on XP/Win2000) and this account has no rights to network resources.
If you need network access you'll need to change the service account running the ApplicationPool (IIS 6/7). Create a new ApplicationPool and change the Impersonation Identity for the application pool. Then map this application pool to your site or virtual directory that holds the application.
+++ Rick ---
>I have an ASP.Net web service I'm developing. It calls a COM server written in VFP9 to do backend work. The com server runs fine tested separately. The error I get says a file does not exist on a network drive share, and I expect its because the credentials the web service is running under don't have access to the network.
>
>Can anybody walk me through fixing the account a web service runs under to have network access?