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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -