Ask a Question related to ASP.NET Security, Design and Development.
-
Robert Phillips #1
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 changed.
ExceptionType="System.ApplicationException"
Message="Access is denied."
TargetSite="IntPtr _GetCurrentToken()"
Source="mscorlib"
at System.Security.Principal.WindowsIdentity._GetCurr entToken()
at System.Security.Principal.WindowsIdentity.GetCurre nt()
at System.AppDomain.GetThreadPrincipal()
at System.Threading.Thread.get_CurrentPrincipal()
at my code.....
my code is:
AppDomain.CurrentDomain.SetPrincipalPolicy(Princip alPolicy.WindowsPrincipal);
//exception happens here
string user = System.Threading.Thread.CurrentPrincipal.Identity. Name;
I originally thought it was a CAS issue, but SetPrincipalPolicy works which
means that the ControlPrincipal SecurityPermission is not the issue.
Reflector shows the _GetCurrentToken() method as
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern IntPtr _GetCurrentToken();
which i believe means it is an internal call into the CLR.
Does anyone have any thoughts on why this would be happening?
Robert Phillips 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 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... -
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...



Reply With Quote

