${windows-identity} always returns "NETWORK SERVICE"

3 messages Options
Embed this post
Permalink
netevang

${windows-identity} always returns "NETWORK SERVICE"

Reply Threaded More More options
Print post
Permalink
Has anyone had any luck configuring the log file name to be the actual logged in user via Forms Authentication (Httpcontext.Current.User.Identity.Name)? If works as expected locally, but when deployed to a remote server, "NETWORK SERVICE" is always returned (as it also is for ${aspnet-user-identity} and ${identity}). I am not sure what I need to configure. Any help would be much appreciated. Thanks.
netevang

Re: ${windows-identity} always returns "NETWORK SERVICE"

Reply Threaded More More options
Print post
Permalink
Solved: I needed to set impersonate=true in the web.config.
ifwdev

Re: ${windows-identity} always returns "NETWORK SERVICE"

Reply Threaded More More options
Print post
Permalink
Use ${aspnet-user-identity}.  windows-identity was still showing the user we created for the application to run under when connecting outside the local network.