Ask a Question related to ASP.NET Security, Design and Development.
-
Marco Herrn #1
Access Denied on WindowsIdentity.GetCurrent()
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
Marco Herrn Guest
-
Web Service + Anon Access, but getting 401 Access Denied Error
I have a simple webservice that just returns a string. The security for this is set to windows authentication in IIS (XP Professional) and anonymous... -
Access is denied in WindowsIdentity.GetCurrent
I am suddenly getting this on a couple of Windows XP (.NET 1.1) machines in my environment. The machines haven't change, and my code hasn't... -
Page.User.Identity.Name vs. WindowsIdentity.GetCurrent().Name
What is the difference between Page.User.Identity.Name and WindowsIdentity.GetCurrent().Name In what scenarios would I use one or the other? -
Access denied when creating Access application object
In an ASP file I am running the following in VBScript in order to extract data from an Access 2002 MDB file which is physically located in the... -
access denied on data access pages
I have created data access pages that worked well when I tried them on two separate computer simutaneously, but when we went into production we got... -
Paul Clement #2
Re: Access Denied on WindowsIdentity.GetCurrent()
On Mon, 07 Mar 2005 11:48:10 +0100, Marco Herrn <nospam_marco.herrn@sourcepark.org> 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 ~~~ [email]pclement@ameritech.net[/email]
Microsoft MVP (Visual Basic)
Paul Clement Guest



Reply With Quote

