HighTechTalks DotNet Forums  

Impersonate + AD

Dotnet Security microsoft.public.dotnet.security


Discuss Impersonate + AD in the Dotnet Security forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Alberto Ortega
 
Posts: n/a

Default Impersonate + AD - 03-02-2005 , 12:05 PM






Hi, I've got a difficult situation...
Is a website that runs on IIS with Anonymous Authentication, the tag
<identity impersonate="false"> on the Web.config file. So the thread is
executed by user "NT AUTHORITY".
So when I use AD API ( FindOne() ) it works well.
The point is that when I impersonate that user by code (that works well too)
when I execute that function from the AD API it returns an error:

{"Operation Error" } [System.Runtime.InteropServices.COMException]:
{System.Runtime.InteropServices.COMException} System.Object:
{System.Runtime.InteropServices.COMException} _className: null
_COMPlusExceptionCode: -532459699 _exceptionMethod:
{System.Reflection.RuntimeMethodInfo} _exceptionMethodString: null _helpURL:
null _HResult: -2147016672 _innerException: { } _message: "Operation Error"
_remoteStackIndex: 0 _remoteStackTraceString: null _source:
"System.DirectoryServices" _stackTrace: {System.Array} _stackTraceString: "
at System.DirectoryServices.DirectoryEntry.Bind(Boole an throwIfFail)\r\n at
System.DirectoryServices.DirectoryEntry.Bind()\r\n at
System.DirectoryServices.DirectoryEntry.get_AdsObj ect()\r\n at
System.DirectoryServices.DirectorySearcher.FindAll (Boolean
findMoreThanOne)\r\n at
System.DirectoryServices.DirectorySearcher.FindOne ()\r\n at
Banelco.CSB.DNN.Providers.ActiveDirectory.LdapAuth entication.GetUser(String
username)" _xcode: -532459699 _xptrs: 0 HelpLink: null HResult: -2147016672
InnerException: { } Message: "Error de operación" Source:
"System.DirectoryServices" StackTrace: " at
System.DirectoryServices.DirectoryEntry.Bind(Boole an throwIfFail)\r\n at
System.DirectoryServices.DirectoryEntry.Bind()\r\n at
System.DirectoryServices.DirectoryEntry.get_AdsObj ect()\r\n at
System.DirectoryServices.DirectorySearcher.FindAll (Boolean
findMoreThanOne)\r\n at
System.DirectoryServices.DirectorySearcher.FindOne ()\r\n at
Banelco.CSB.DNN.Providers.ActiveDirectory.LdapAuth entication.GetUser(String
username)" TargetSite: {System.Reflection.RuntimeMethodInfo


Thanks

Alberto Ortega



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.