hi,

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???
 
S

Steve

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
 
G

Guest

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
 
M

Mark Rae [MVP]

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...
 
G

Guest

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.
 
M

Mark Rae [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top