|
53 | 53 |
|
54 | 54 |
|
55 | 55 | ## Examples
|
56 |
| - The following code example demonstrates the client side of a client-server connection that uses the <xref:System.Net.Security.NegotiateStream>. The client authenticates and sends a message to the server asynchronously. |
| 56 | +The following example demonstrates the client side of a client-server connection that uses the <xref:System.Net.Security.NegotiateStream>. The client authenticates and sends a message to the server asynchronously. |
57 | 57 |
|
58 |
| - [!code-cpp[NclNegoAsyncClient#0](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#0)] |
59 |
| - [!code-csharp[NclNegoAsyncClient#0](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#0)] |
60 |
| - |
61 |
| - The following code example demonstrates the server side of a client-server connection that uses the <xref:System.Net.Security.NegotiateStream> to authenticate the client and read a message sent by the client. |
| 58 | +[!code-cpp[NclNegoAsyncClient#0](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#0)] |
| 59 | +[!code-csharp[NclNegoAsyncClient#0](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#0)] |
| 60 | +[!code-vb[NclNegoAsyncClient#0](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#0)] |
| 61 | +
|
| 62 | +The following code example demonstrates the server side of a client-server connection that uses the <xref:System.Net.Security.NegotiateStream> to authenticate the client and read a message sent by the client. |
62 | 63 |
|
63 |
| - [!code-cpp[NclNegoAsyncServer#0](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoAsyncServer/CPP/NclNegoAsyncServer.cpp#0)] |
64 |
| - [!code-csharp[NclNegoAsyncServer#0](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoAsyncServer/CS/server.cs#0)] |
| 64 | +[!code-cpp[NclNegoAsyncServer#0](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoAsyncServer/CPP/NclNegoAsyncServer.cpp#0)] |
| 65 | +[!code-csharp[NclNegoAsyncServer#0](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoAsyncServer/CS/server.cs#0)] |
65 | 66 |
|
66 | 67 | ]]></format>
|
67 | 68 | </remarks>
|
|
185 | 186 |
|
186 | 187 |
|
187 | 188 | ## Examples
|
188 |
| - The following code example demonstrates calling this constructor. This code example is part of a larger example provided for the <xref:System.Net.Security.NegotiateStream> class. |
189 |
| - |
190 |
| - [!code-cpp[NclNegoAsyncClient#1](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#1)] |
191 |
| - [!code-csharp[NclNegoAsyncClient#1](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#1)] |
| 189 | +The following example demonstrates calling this constructor. This code example is part of a larger example provided for the <xref:System.Net.Security.NegotiateStream> class. |
192 | 190 |
|
| 191 | +[!code-cpp[NclNegoAsyncClient#1](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#1)] |
| 192 | +[!code-csharp[NclNegoAsyncClient#1](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#1)] |
| 193 | +[!code-vb[NclNegoAsyncClient#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#1)] |
| 194 | +
|
193 | 195 | ]]></format>
|
194 | 196 | </remarks>
|
195 | 197 | <exception cref="T:System.ArgumentNullException">
|
|
1503 | 1505 |
|
1504 | 1506 |
|
1505 | 1507 | ## Examples
|
1506 |
| - The following code example demonstrates calling this method to begin an asynchronous authentication for the client. |
1507 |
| - |
1508 |
| - [!code-cpp[NclNegoAsyncClient#2](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#2)] |
1509 |
| - [!code-csharp[NclNegoAsyncClient#2](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#2)] |
| 1508 | +The following example demonstrates calling this method to begin an asynchronous authentication for the client. |
1510 | 1509 |
|
| 1510 | +[!code-cpp[NclNegoAsyncClient#2](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#2)] |
| 1511 | +[!code-csharp[NclNegoAsyncClient#2](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#2)] |
| 1512 | +[!code-vb[NclNegoAsyncClient#2](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#2)] |
| 1513 | +
|
1511 | 1514 | ]]></format>
|
1512 | 1515 | </remarks>
|
1513 | 1516 | <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
|
|
2304 | 2307 |
|
2305 | 2308 |
|
2306 | 2309 | ## Examples
|
2307 |
| - The following code example demonstrates beginning an asynchronous write operation. |
| 2310 | +The following example demonstrates beginning an asynchronous write operation. |
2308 | 2311 |
|
2309 |
| - [!code-cpp[NclNegoAsyncClient#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#3)] |
2310 |
| - [!code-csharp[NclNegoAsyncClient#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#3)] |
2311 |
| - |
2312 |
| - The following method is called when the operation completes. |
2313 |
| - |
2314 |
| - [!code-cpp[NclNegoAsyncClient#4](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#4)] |
2315 |
| - [!code-csharp[NclNegoAsyncClient#4](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#4)] |
| 2312 | +[!code-cpp[NclNegoAsyncClient#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#3)] |
| 2313 | +[!code-csharp[NclNegoAsyncClient#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#3)] |
| 2314 | +[!code-vb[NclNegoAsyncClient#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#3)] |
| 2315 | +
|
| 2316 | +The following method is called when the operation completes. |
2316 | 2317 |
|
| 2318 | +[!code-cpp[NclNegoAsyncClient#4](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#4)] |
| 2319 | +[!code-csharp[NclNegoAsyncClient#4](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#4)] |
| 2320 | +[!code-vb[NclNegoAsyncClient#4](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#4)] |
| 2321 | +
|
2317 | 2322 | ]]></format>
|
2318 | 2323 | </remarks>
|
2319 | 2324 | <exception cref="T:System.ArgumentNullException">
|
@@ -2871,11 +2876,12 @@ Authentication has not occurred.</exception>
|
2871 | 2876 |
|
2872 | 2877 |
|
2873 | 2878 | ## Examples
|
2874 |
| - The following code example demonstrates a method that is called to complete the asynchronous write operation. For an example that demonstrates starting the operation, see <xref:System.Net.Security.NegotiateStream.BeginWrite%2A>. |
2875 |
| - |
2876 |
| - [!code-cpp[NclNegoAsyncClient#4](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#4)] |
2877 |
| - [!code-csharp[NclNegoAsyncClient#4](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#4)] |
| 2879 | +The following example demonstrates a method that is called to complete the asynchronous write operation. For an example that demonstrates starting the operation, see <xref:System.Net.Security.NegotiateStream.BeginWrite%2A>. |
2878 | 2880 |
|
| 2881 | +[!code-cpp[NclNegoAsyncClient#4](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#4)] |
| 2882 | +[!code-csharp[NclNegoAsyncClient#4](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#4)] |
| 2883 | +[!code-vb[NclNegoAsyncClient#4](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#4)] |
| 2884 | +
|
2879 | 2885 | ]]></format>
|
2880 | 2886 | </remarks>
|
2881 | 2887 | <exception cref="T:System.ArgumentNullException">
|
|
0 commit comments