windows - Get currently logged in user asp.net -
i´m having bit of trouble , see if me out!
for webapp in asp.net, need able user name.
i had been able through:
user = principal.windowsidentity.getcurrent.name.tostring on developement machine, when go production, shows asp.net user...
i tried
user = context.user.identity.name.tostring
and in dev station blank string, , in production, "apppool/asp.net4.0
any ideas how working?
this webapp supposed work in intranet.
make sure you've enabled windows authentication in web.config (check .config.xxx transforms too). should see tag in web.config:
<system.web> ... <authentication mode="windows" /> ... </system.web>
Comments
Post a Comment