diff --git a/samples/snippets/csharp/VS_Snippets_Remoting/NclSslClientSync/CS/clientsync.cs b/samples/snippets/csharp/VS_Snippets_Remoting/NclSslClientSync/CS/clientsync.cs index 53bfdaa77c8..b32b6c48a95 100644 --- a/samples/snippets/csharp/VS_Snippets_Remoting/NclSslClientSync/CS/clientsync.cs +++ b/samples/snippets/csharp/VS_Snippets_Remoting/NclSslClientSync/CS/clientsync.cs @@ -40,7 +40,7 @@ public static void RunClient(string machineName, string serverName) // // Create a TCP/IP client socket. // machineName is the host running the server application. - TcpClient client = new TcpClient(machineName,443); + TcpClient client = new TcpClient(machineName,8080); Console.WriteLine("Client connected."); // Create an SSL stream that will close the client's stream. SslStream sslStream = new SslStream( diff --git a/samples/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientSync/VB/clientsync.vb b/samples/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientSync/VB/clientsync.vb index fe77aae953e..d157bc56155 100644 --- a/samples/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientSync/VB/clientsync.vb +++ b/samples/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientSync/VB/clientsync.vb @@ -36,7 +36,7 @@ Namespace Examples.System.Net ' ' Create a TCP/IP client socket. ' machineName is the host running the server application. - Dim client = New TcpClient(machineName, 443) + Dim client = New TcpClient(machineName, 8080) Console.WriteLine("Client connected.") ' Create an SSL stream that will close the client's stream. diff --git a/xml/System.Net.Security/SslStream.xml b/xml/System.Net.Security/SslStream.xml index dbd30efb0b3..3808b9e7224 100644 --- a/xml/System.Net.Security/SslStream.xml +++ b/xml/System.Net.Security/SslStream.xml @@ -41,7 +41,10 @@ Provides a stream used for client-server communication that uses the Secure Socket Layer (SSL) security protocol to authenticate the server and optionally the client. [!NOTE] +> Be sure to include the private key in the certificate, otherwise you'll get a decryption error on the server side. The server needs the private key to decrypt the received messages and complete the handshake. + ## Remarks SSL protocols help to provide confidentiality and integrity checking for messages transmitted using an . An SSL connection, such as that provided by , should be used when communicating sensitive information between a client and a server. Using an helps to prevent anyone from reading and tampering with information while it is in transit on the network.