On Mon, 07 Mar 2005 11:48:10 +0100, Marco Herrn <> wrote:
¤ 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.GetCurre nt().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._Resolve Identity(IntPtr
¤ userToken)
¤ at System.Security.Principal.WindowsIdentity.get_Name ()
¤
¤
¤ What is the reason for this? Calling
¤ System.Security.Principal.WindowsIdentity.GetCurre nt().IsAuthenticated
¤ does not lead to this exception! So what can the reason be?
¤
¤ Regards
¤ Marco
Which level of authentication is your web app implementing? You don't have Anonymous turned on do
you?
Paul ~~~
Microsoft MVP (Visual Basic)