0

I have deployed my web application on azure cloud.When i try to get identity user using WindowsIdentity.GetCurrent(). Name It throws me following exception

System.Security.SecurityException: at System.Security.Principal.WindowsIdentity.KerbS4ULogon(String upn, SafeAccessTokenHandle& safeTokenHandle) at System.Security.Principal.WindowsIdentity..ctor(String sUserPrincipalName, String type) at System.Security.Principal.WindowsIdentity..ctor(String sUserPrincipalName)

Where as this code works fine on my local environment and domain

Byron Tardif
  • 1,172
  • 6
  • 16
ars
  • 1
  • I tried the code on multi app tiers(free/shared/basic), all worked fine. I can get the identity name as following format. IIS APPPOOL\{app name}. Have you changed any configuration of your web app? – Amor Jul 19 '17 at 07:34
  • yes , i added authenticated user in identity pool. that is custom account in application pool identity – ars Jul 19 '17 at 13:36
  • Are you using Cloud Service instead of Azure Web App? – Amor Jul 19 '17 at 14:02
  • I have deployed my web app on azure. I want to access physical directory on azure file system. Before i access azure file system i have to validate pool identity has write permission on azure file directory. When i try to get identity user it throws exception. – ars Jul 21 '17 at 07:05
  • Can you add more details as to what is the version of IIS and what is the application pool identity set to? Is it set to **application pool identity** or something else? Is the pipeline set to **Classic/Integrated** You also need to provide what authentication is the Site configured to use? Is it using Windows Authentication or anonymous or other? – Kaushal Kumar Panday Jul 21 '17 at 14:20

0 Answers0