I need some help to determine what is causing this issue. I find very little information about this exception on the Web.
I receive the following error when trying to connect the the email server;
"No connection could be made because the target machine actively refused it"
The following Code Sample what I am using. the error occurs on s.connect(endPt);
IPHostEntry IPhst = Dns.Resolve(SmtpServer);
IPEndPoint endPt = new IPEndPoint(IPhst.AddressList[0], 25);
Socket s= new Socket(endPt.AddressFamily, SocketType.Stream,ProtocolType.Tcp);
System.Console.Write(IPhst);
System.Console.Write(endPt);
try
{
s.Connect(endPt);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return false;
}
Thanks Tim
Tim [ tbconrad ( at ) gmail dot com ],
2005-06-06 12:42:27
#