hi,

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

this is my code
string filter ="LDAP://165.22.55.9";
DirectoryEntry dr = new DirectoryEntry(filter);
DirectorySearcher mySearcher = new DirectorySearcher(dr);
mySearcher.Filter = ("CN="+LoginName);
try
{
DirectorySearcher(filter);
mySearcher.SearchScope = SearchScope.Subtree;
SearchResult oResult = mySearcher.FindOne();
if ( oResult != null)
{
bool IsValidLoginName = true;
}
}

this works as long as I am running my asp .Net 1.1 application on
htt://Localhost/myWebApplication/index.aspx.
But when this doesn't work when I replace my localhost with my ip adress.
FindOne() gives an exception. how can I fix this?? what have I missed???
 
By using localhost, you bypass any firewall. When you use your ip
address, I believe it goes further down the network stack (possibly out
onto the wire), and could be getting caught by your firewall?

Do you have your firewall turned on?


Steve C.
MCSD,MCAD,MCSE,MCP+I,CNE,CNA,CCNA
 
no

--
LZ


Steve said:
By using localhost, you bypass any firewall. When you use your ip
address, I believe it goes further down the network stack (possibly out
onto the wire), and could be getting caught by your firewall?

Do you have your firewall turned on?


Steve C.
MCSD,MCAD,MCSE,MCP+I,CNE,CNA,CCNA
 
FindOne() gives an exception

There is little point in telling a technical newsgroup that you're getting
an exception if you don't actually say what exception you're getting...
 
Hi,
system.applicationException:
system.runtime.interopServices.COMException(0x80072020): An operations error
occurred at system.directoryservices.directoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind() at
Syste.DrectoryServices.DirectoryEntry.get_AdsObject() at
System.DirectoryServices.Directorysearcher.FindAll(Boolean findMoreThanOne)
at system.directoryServices.directorySearcher.findOne .............. etc

this is my exception.
Sorry didn't mention it before.
 
system.applicationException:
system.runtime.interopServices.COMException(0x80072020): An operations
error
occurred at system.directoryservices.directoryEntry.Bind(Boolean
throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind() at
Syste.DrectoryServices.DirectoryEntry.get_AdsObject() at
System.DirectoryServices.Directorysearcher.FindAll(Boolean
findMoreThanOne)
at system.directoryServices.directorySearcher.findOne .............. etc

This is discussed in this thread:
http://www.issociate.de/board/post/250533/"Sudden"_Active_Directory_error_on_ASP.NET.html

A solution is given and confirmed by Steven Cheng from Microsoft Online
Support.
 
Back
Top