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