[Mono-list] User validation in Active Directory

janopi opi.registrace at centrum.cz
Mon Jun 16 03:29:10 EDT 2008

 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,
	DirectorySearcher ds = new DirectorySearcher(de);
	ds.Filter = "SAMAccountName=" + login;				
	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)
  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. 


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20080616/0b54d537/attachment-0003.html 

More information about the Mono-list mailing list