Environment: IIS 7.5, Windows 7 Pro, Visual Studio 2012, Webapp uses Framework 4.0
I tried to get a directory listing from a fileserver using path like \\server\share\directory by a webservice (asmx).
I use the following configuration in web.config:
<identity impersonate="true" />
<authentication mode="Windows" />
I check User.Identity.Name and Threading.Thread.CurrentPrincipal.Identity.Name and get the used Domain\Username for login. A "System.UnauthorizedAccessException" is thrown if i try to get a directory listing of "\\server\share\directory" .
I tried many things, even to use local system, local service or the domain administrator as identity for the application-pool.
When I change the configuration system.webServer/serverRuntime authenticatedUserOverride from UseAuthenticatedUser to UseWorkerProcessUser, i can reach the network share, but under the identity of the application-pool user and not of the user, that uses the webservice. In this configuration i cannot get Information about the login, that was used, instead i get as identity always the user for the application-pool.
Is possible to get the windows-login-user without impersonate? Or what have to be done to get successfull access to networkfilesystem?
I think UAC is dissabled on my machine.