c# - Get current logged in user IIS returning DefaultAppPool -
i have asp.net application on server uses windowsauthentication log in. scenario simple: users logged in, use same credentials login application.
certainly, on iisexpress on machine works great, when try login application on server, current user returned defaultapppool.
i guess it's missing impersonate config on iis. tried current user with:
string username = httpcontext.current.request.logonuseridentity.name; string username = windowsidentity.getcurrent().name;
... , of above returns current user loggedin works on iisexpress, not on server iis.
iis express config
defaultapppool
- framework version 4.0
- application pool identity
application authentication config
server info
windows 2008 r2 enterprise
iis 7.5
pd: not best english
i had similar issues; far can tell because web.config file needs have following entries:
<authentication mode="windows" /> <identity impersonate="true" />
also in iis/authentication section in internet information services (iis) manager, make sure anonymous authentication , windows authentication enabled. had asp.net impersonation checked mistake , giving me same error described in post. once disabled (along other modifications), seems working fine.
thanks, keenan
Comments
Post a Comment