Quantcast
Channel: General
Viewing all articles
Browse latest Browse all 7363

Accessing Windows domain user from dotnet 4.5 web app on IIS 8/ Win 2012

$
0
0

I am trying to get current windows user that logged into the computer, meaning, windows identity from .NET Framwork 4.5 on windows server 2012.  When I use System.Security.Principal.WindowsIdentity.GetCurrent().Name on local computer (win 7), no problem. But it is giving me the apppool name when I try the same on windows 2012 server.  I have setup integrated authentication for the apppool and set the impersonate=true/false and no luck either way.

When I try to get System.Security.Principal.WindowsIdentity.GetCurrent().Name, I get the value as "NT AUTHORITY\IUSR" instead of actual domainname\username

Thanks,


Viewing all articles
Browse latest Browse all 7363

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>