Created
August 14, 2013 14:56
-
-
Save kmlprtsng/6231814 to your computer and use it in GitHub Desktop.
Get user the web app service is running under
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //http://stackoverflow.com/questions/275824/how-to-find-out-which-account-my-asp-net-code-is-running-under | |
| var user = System.Security.Principal.WindowsIdentity.GetCurrent().User; | |
| var userName = user.Translate(typeof (System.Security.Principal.NTAccount)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment