Hi, I am trying to use TLS to connect to the Windows 2008 Server from windows XP, I set Authentication=False.
It throws the below authentication exception when connected to WIN 2008 Server with SP2, where as it used to work fine with WIN 2003:
System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
Below is the sample code.
protected Stream stream;
IPEndPoint ipe = new IPEndPoint(addr, port);
Socket socket = new Socket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
socket .SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, options.keepAlive);
socket .LingerState = new LingerOption(options.lingerTime >= 0, options.lingerTime >= 0 ? options.lingerTime : 0);
socket .NoDelay = options.noDelay;
stream = new SslStream(stream, false, new RemoteCertificateValidationCallback(true), null);
I am using .Net 3.0 Frame work & VS 2005
Any help over here is highly appreciated.
View Complete Post