M
Marco Herrn
Hi,
I am developing an ASP.NET Application in C#. I need to find out the
user under which the process is running on runtime. So I use
System.Security.Principal.WindowsIdentity.GetCurrent().Name to get the
name of the current user. But I get this exception:
Exception: System.ApplicationException
Message: Access is denied.
Source: mscorlib
at System.Security.Principal.WindowsIdentity._ResolveIdentity(IntPtr
userToken)
at System.Security.Principal.WindowsIdentity.get_Name()
What is the reason for this? Calling
System.Security.Principal.WindowsIdentity.GetCurrent().IsAuthenticated
does not lead to this exception! So what can the reason be?
Regards
Marco
I am developing an ASP.NET Application in C#. I need to find out the
user under which the process is running on runtime. So I use
System.Security.Principal.WindowsIdentity.GetCurrent().Name to get the
name of the current user. But I get this exception:
Exception: System.ApplicationException
Message: Access is denied.
Source: mscorlib
at System.Security.Principal.WindowsIdentity._ResolveIdentity(IntPtr
userToken)
at System.Security.Principal.WindowsIdentity.get_Name()
What is the reason for this? Calling
System.Security.Principal.WindowsIdentity.GetCurrent().IsAuthenticated
does not lead to this exception! So what can the reason be?
Regards
Marco