470,647 Members | 1,115 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

COMException 0x80072020 with LDAP Query


Hi all,
I've read many times some threads with this problem but no answer is
simple and good enough. Here's my situation:I've developed a web
application with query LDAP which from System.Environment.UserName gets
Name,Department, and so on. It works fine if I access the site with
http://localhost/Site, but if I use
http://Server/Site it gives me the following error:
[COMException (0x80072020): An operations error occurred.
]
System.DirectoryServices.DirectoryEntry.Bind(Boole an throwIfFail)
+610
System.DirectoryServices.DirectoryEntry.Bind() +36
System.DirectoryServices.DirectoryEntry.get_AdsObj ect() +31
System.DirectoryServices.DirectorySearcher.FindAll (Boolean
findMoreThanOne) +73
System.DirectoryServices.DirectorySearcher.FindOne () +42
MasterPage.GetID() in
c:\inetpub\wwwroot\trackingactivity\MasterPage.mas ter.vb:19
MasterPage.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\trackingactivity\MasterPage.mas ter.vb:7
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1061

and the source of the problem is the function:
Result = mySearcher.FindOne()
So, the server is in my domain, I use VS2005, iis settings are:
Enable anonymous access --> NO!!!
Enable Integrated Windows, Digest, Basic Authentication

Please, what can we do to make it work?:)))

Thank you.

--
Tatopitta
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Dec 3 '05 #1
1 6471
Tatopitta if you are using ASP.NET 2.0
Why don't you make use of the Membership Provider for AD look through :-
http://blogs.msdn.com/guntherb/archi...10/391964.aspx
Its should make your work easier:)
Patrick

"Tatopitta" <Ta**************@mail.codecomments.com> wrote in message
news:Ta**************@mail.codecomments.com...

Hi all,
I've read many times some threads with this problem but no answer is
simple and good enough. Here's my situation:I've developed a web
application with query LDAP which from System.Environment.UserName gets
Name,Department, and so on. It works fine if I access the site with
http://localhost/Site, but if I use
http://Server/Site it gives me the following error:
[COMException (0x80072020): An operations error occurred.
]
System.DirectoryServices.DirectoryEntry.Bind(Boole an throwIfFail)
+610
System.DirectoryServices.DirectoryEntry.Bind() +36
System.DirectoryServices.DirectoryEntry.get_AdsObj ect() +31
System.DirectoryServices.DirectorySearcher.FindAll (Boolean
findMoreThanOne) +73
System.DirectoryServices.DirectorySearcher.FindOne () +42
MasterPage.GetID() in
c:\inetpub\wwwroot\trackingactivity\MasterPage.mas ter.vb:19
MasterPage.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\trackingactivity\MasterPage.mas ter.vb:7
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1061

and the source of the problem is the function:
Result = mySearcher.FindOne()
So, the server is in my domain, I use VS2005, iis settings are:
Enable anonymous access --> NO!!!
Enable Integrated Windows, Digest, Basic Authentication

Please, what can we do to make it work?:)))

Thank you.

--
Tatopitta
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Dec 4 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Bryan | last post: by
reply views Thread by Gerry Sinkiewicz | last post: by
3 posts views Thread by RJN | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.