Unable to connect client to server using sslstream
- From: vlaxmi2001in@xxxxxxxxx
- Date: 30 Aug 2006 23:14:00 -0700
Hi All,
I am trying to connect client to server using sslstream. I have
created certificate using makecert.exe and using the same.The example i
am trying is from msdn for sslstream class in framework 2.0.In the
example , client is using the server name ,i am not getting what name
to be given. please any body can help me.
TcpClient client = new TcpClient(machineName, 443);
Console.WriteLine("Client connected.");
// Create an SSL stream that will close the client's
stream.
SslStream sslStream = new SslStream(
client.GetStream(),
false,
new
RemoteCertificateValidationCallback(ValidateServerCertificate),
null
);
// The server name must match the name on the server
certificate.
try
{
sslStream.AuthenticateAsClient(serverName);
}
.
- Prev by Date: Serial port Error: The I/O operation has been aborted because of either a thread exit or an application request
- Next by Date: Re: How to boost network utilization with Socket/TcpClient (.NET 1
- Previous by thread: Serial port Error: The I/O operation has been aborted because of either a thread exit or an application request
- Next by thread: Smartcard and Windows XP SP2
- Index(es):
Relevant Pages
|