Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Access Denied on WindowsIdentity.GetCurrent()

Reply
Thread Tools

Access Denied on WindowsIdentity.GetCurrent()

 
 
Marco Herrn
Guest
Posts: n/a
 
      03-07-2005
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
 
Reply With Quote
 
 
 
 
Paul Clement
Guest
Posts: n/a
 
      03-07-2005
On Mon, 07 Mar 2005 11:48:10 +0100, Marco Herrn <(E-Mail Removed)> 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 ~~~ http://www.velocityreviews.com/forums/(E-Mail Removed)
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
403 Forbidden: You were denied access because: Access denied by access control list Southern Kiwi NZ Computing 6 03-19-2006 05:19 AM
Access Denied to access db with asp.net Ros@ ASP .Net 3 02-22-2006 04:51 PM
e-mail access denied by access control list Ram Ananthraman Computer Support 4 03-17-2005 09:22 PM
access denied by access control list Hung Computer Support 8 10-12-2003 05:27 PM



Advertisments