Hi,
I try to integrate AD user account validation into a MONO project. I got
this piece of code, that works perfectly undex .NET 2.0, but under MONO it
does not.
DirectoryEntry de = new DirectoryEntry(null, domain + "\\" + login,
password);
try
{
DirectorySearcher ds = new DirectorySearcher(de);
ds.Filter = "SAMAccountName=" + login;
ds.PropertiesToLoad.Add("cn");
SearchResult sr = ds.FindOne();
return (sr != null);
}
catch (Exception ex)
{
return false;
}
When running this piece of code under Linux MONO i get this Exception:
6/14/2008 7:12:51 AM: Connection refused
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remote_end)
[0x00000]
at System.Net.Sockets.TcpClient.Connect (System.Net.IPEndPoint
remote_end_point) [0x00000]
at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress[]
ipAddresses, Int32 port) [0x00000]
Thanks a lot for any kind of help and advice.
JanOpi
--
View this message in context:
http://www.nabble.com/User-validation-in-Active-Directory-tp17859278p17859278.html
Sent from the Mono - General mailing list archive at Nabble.com.
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list