From 469031369a1a07ff517d1ff359dd5e519d6fd741 Mon Sep 17 00:00:00 2001 From: Scott Addie Date: Mon, 26 Feb 2018 15:39:16 -0600 Subject: [PATCH 1/8] Fix escape characters in HttpListener Remarks section --- xml/System.Net/HttpListener.xml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/xml/System.Net/HttpListener.xml b/xml/System.Net/HttpListener.xml index b72bbee49e8cc..e7753035a4112 100644 --- a/xml/System.Net/HttpListener.xml +++ b/xml/System.Net/HttpListener.xml @@ -29,41 +29,41 @@ class, you can create a simple HTTP protocol listener that responds to HTTP requests. The listener is active for the lifetime of the object and runs within your application with its permissions. + Using the class, you can create a simple HTTP protocol listener that responds to HTTP requests. The listener is active for the lifetime of the object and runs within your application with its permissions. > [!NOTE] -> This class is available only on computers running the Windows XP SP2 or Windows Server 2003 operating systems. If you attempt to create an object on a computer that is running an earlier operating system, the constructor throws a exception. +> This class is available only on computers running the Windows XP SP2 or Windows Server 2003 operating systems. If you attempt to create an object on a computer that is running an earlier operating system, the constructor throws a exception. - To use , create a new instance of the class using the constructor and use the property to gain access to the collection that holds the strings that specify which Uniform Resource Identifier (URI) prefixes the should process. + To use , create a new instance of the class using the constructor and use the property to gain access to the collection that holds the strings that specify which Uniform Resource Identifier (URI) prefixes the should process. - A URI prefix string is composed of a scheme (http or https), a host, an optional port, and an optional path. An example of a complete prefix string is "`http://www.contoso.com:8080/customerData``/`". Prefixes must end in a forward slash ("/"). The object with the prefix that most closely matches a requested URI responds to the request. Multiple objects cannot add the same prefix; a exception is thrown if a adds a prefix that is already in use. + A URI prefix string is composed of a scheme (http or https), a host, an optional port, and an optional path. An example of a complete prefix string is *http://www.contoso.com:8080/customerData/*. Prefixes must end in a forward slash ("/"). The object with the prefix that most closely matches a requested URI responds to the request. Multiple objects cannot add the same prefix; a exception is thrown if a adds a prefix that is already in use. - When a port is specified, the host element can be replaced with "*" to indicate that the accepts requests sent to the port if the requested URI does not match any other prefix. For example, to receive all requests sent to port 8080 when the requested URI is not handled by any , the prefix is "`http://*:8080``/`". Similarly, to specify that the accepts all requests sent to a port, replace the host element with the "+" character, "`https://+:8080`". The "\*" and "+" characters can be present in prefixes that include paths. + When a port is specified, the host element can be replaced with "\*" to indicate that the accepts requests sent to the port if the requested URI does not match any other prefix. For example, to receive all requests sent to port 8080 when the requested URI is not handled by any , the prefix is *http://\*:8080/*. Similarly, to specify that the accepts all requests sent to a port, replace the host element with the "+" character. For example, *https://+:8080*. The "\*" and "+" characters can be present in prefixes that include paths. - Starting with .NET 4.5.3 and Windows 10, wildcard subdomains are supported in URI prefixes that are managed by an object. To specify a wildcard subdomain, use the "*" character as part of the hostname in a URI prefix: for example, `http://*.foo.com/`, and pass this as the argument to the HttpListenerPrefixCollection.Add method. This will work on .NET 4.5.3 and Windows 10; in earlier versions, this would generate an + Starting with .NET 4.6 and Windows 10, wildcard subdomains are supported in URI prefixes that are managed by an object. To specify a wildcard subdomain, use the "\*" character as part of the hostname in a URI prefix. For example, *http://\*.foo.com/*. Pass this as the argument to the HttpListenerPrefixCollection.Add method. This will work on .NET 4.6 and Windows 10; in earlier versions, this would generate an . - To begin listening for requests from clients, add the URI prefixes to the collection and call the method. offers both synchronous and asynchronous models for processing client requests. Requests and their associated responses are accessed using the object returned by the method or its asynchronous counterparts, the and methods. + To begin listening for requests from clients, add the URI prefixes to the collection and call the method. offers both synchronous and asynchronous models for processing client requests. Requests and their associated responses are accessed using the object returned by the method or its asynchronous counterparts, the and methods. - The synchronous model is appropriate if your application should block while waiting for a client request and if you want to process only one request at a time. Using the synchronous model, call the method, which waits for a client to send a request. The method returns an object to you for processing when one occurs. + The synchronous model is appropriate if your application should block while waiting for a client request and if you want to process only one request at a time. Using the synchronous model, call the method, which waits for a client to send a request. The method returns an object to you for processing when one occurs. - In the more complex asynchronous model, your application does not block while waiting for requests and each request is processed in its own execution thread. Use the method to specify an application-defined method to be called for each incoming request. Within that method, call the method to obtain the request, process it, and respond. + In the more complex asynchronous model, your application does not block while waiting for requests and each request is processed in its own execution thread. Use the method to specify an application-defined method to be called for each incoming request. Within that method, call the method to obtain the request, process it, and respond. - In either model, incoming requests are accessed using the property and are represented by objects. Similarly, responses are accessed using the property and are represented by objects. These objects share some functionality with the and objects, but the latter objects cannot be used in conjunction with because they implement client, not server, behaviors. + In either model, incoming requests are accessed using the property and are represented by objects. Similarly, responses are accessed using the property and are represented by objects. These objects share some functionality with the and objects, but the latter objects cannot be used in conjunction with because they implement client, not server, behaviors. - An can require client authentication. You can either specify a particular scheme to use for authentication, or you can specify a delegate that determines the scheme to use. You must require some form of authentication to obtain information about the client's identity. For additional information, see the , , and properties. + An can require client authentication. You can either specify a particular scheme to use for authentication, or you can specify a delegate that determines the scheme to use. You must require some form of authentication to obtain information about the client's identity. For additional information, see the , , and properties. > [!NOTE] -> If you create an using https, you must select a Server Certificate for that listener. Otherwise, an query of this will fail with an unexpected close of the connection. +> If you create an using https, you must select a Server Certificate for that listener. Otherwise, an query of this will fail with an unexpected close of the connection. > [!NOTE] -> You can configure Server Certificates and other listener options by using HttpCfg.exe. See [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/http/http/httpcfg_exe.asp](http://msdn.microsoft.com/library/default.asp?url=/library/http/http/httpcfg_exe.asp) for more details. The executable is shipped with Windows Server 2003, or can be built from source code available in the Platform SDK. +> You can configure Server Certificates and other listener options by using HttpCfg.exe. See [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/http/http/httpcfg_exe.asp](http://msdn.microsoft.com/library/default.asp?url=/library/http/http/httpcfg_exe.asp) for more details. The executable is shipped with Windows Server 2003, or can be built from source code available in the Platform SDK. > [!NOTE] -> If you specify multiple authentication schemes for the , the listener will challenge clients in the following order: `Negotiate`, `NTLM`, `Digest`, and then `Basic`. +> If you specify multiple authentication schemes for the , the listener will challenge clients in the following order: `Negotiate`, `NTLM`, `Digest`, and then `Basic`. -## Examples +## Examples The following code example demonstrates using a . [!code-csharp[Net_Listener_Basic#2](~/samples/snippets/csharp/VS_Snippets_Remoting/Net_Listener_Basic/CS/test.cs#2)] From 457bb90bc3e67845b5b262e0af1a4e8e8e789727 Mon Sep 17 00:00:00 2001 From: Scott Addie Date: Tue, 27 Feb 2018 09:28:08 -0600 Subject: [PATCH 2/8] React to feedback --- xml/System.Net/HttpListener.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Net/HttpListener.xml b/xml/System.Net/HttpListener.xml index e7753035a4112..982bebdd2fcf2 100644 --- a/xml/System.Net/HttpListener.xml +++ b/xml/System.Net/HttpListener.xml @@ -40,7 +40,7 @@ When a port is specified, the host element can be replaced with "\*" to indicate that the accepts requests sent to the port if the requested URI does not match any other prefix. For example, to receive all requests sent to port 8080 when the requested URI is not handled by any , the prefix is *http://\*:8080/*. Similarly, to specify that the accepts all requests sent to a port, replace the host element with the "+" character. For example, *https://+:8080*. The "\*" and "+" characters can be present in prefixes that include paths. - Starting with .NET 4.6 and Windows 10, wildcard subdomains are supported in URI prefixes that are managed by an object. To specify a wildcard subdomain, use the "\*" character as part of the hostname in a URI prefix. For example, *http://\*.foo.com/*. Pass this as the argument to the HttpListenerPrefixCollection.Add method. This will work on .NET 4.6 and Windows 10; in earlier versions, this would generate an . + Starting with .NET Framework 4.6 and Windows 10, wildcard subdomains are supported in URI prefixes that are managed by an object. To specify a wildcard subdomain, use the "\*" character as part of the hostname in a URI prefix. For example, *http://\*.foo.com/*. Pass this as the argument to the HttpListenerPrefixCollection.Add method. This works on .NET Framework 4.6 and Windows 10; in earlier versions, this generates an . To begin listening for requests from clients, add the URI prefixes to the collection and call the method. offers both synchronous and asynchronous models for processing client requests. Requests and their associated responses are accessed using the object returned by the method or its asynchronous counterparts, the and methods. From 1ff96ce1f18c6fcdeb6e592f1d58a9028e4096cd Mon Sep 17 00:00:00 2001 From: Scott Addie Date: Tue, 27 Feb 2018 09:31:22 -0600 Subject: [PATCH 3/8] Remove note --- xml/System.Net/HttpListener.xml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xml/System.Net/HttpListener.xml b/xml/System.Net/HttpListener.xml index 982bebdd2fcf2..87c187443149e 100644 --- a/xml/System.Net/HttpListener.xml +++ b/xml/System.Net/HttpListener.xml @@ -30,10 +30,7 @@ ## Remarks Using the class, you can create a simple HTTP protocol listener that responds to HTTP requests. The listener is active for the lifetime of the object and runs within your application with its permissions. - -> [!NOTE] -> This class is available only on computers running the Windows XP SP2 or Windows Server 2003 operating systems. If you attempt to create an object on a computer that is running an earlier operating system, the constructor throws a exception. - + To use , create a new instance of the class using the constructor and use the property to gain access to the collection that holds the strings that specify which Uniform Resource Identifier (URI) prefixes the should process. A URI prefix string is composed of a scheme (http or https), a host, an optional port, and an optional path. An example of a complete prefix string is *http://www.contoso.com:8080/customerData/*. Prefixes must end in a forward slash ("/"). The object with the prefix that most closely matches a requested URI responds to the request. Multiple objects cannot add the same prefix; a exception is thrown if a adds a prefix that is already in use. From ea4d08fe42d56983b15f5f24dc939fd7192c4606 Mon Sep 17 00:00:00 2001 From: Scott Addie Date: Tue, 27 Feb 2018 10:37:56 -0600 Subject: [PATCH 4/8] Add xref link to HttpListenerPrefixCollection.Add method --- xml/System.Net/HttpListener.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Net/HttpListener.xml b/xml/System.Net/HttpListener.xml index 87c187443149e..1c8c940214e2e 100644 --- a/xml/System.Net/HttpListener.xml +++ b/xml/System.Net/HttpListener.xml @@ -37,7 +37,7 @@ When a port is specified, the host element can be replaced with "\*" to indicate that the accepts requests sent to the port if the requested URI does not match any other prefix. For example, to receive all requests sent to port 8080 when the requested URI is not handled by any , the prefix is *http://\*:8080/*. Similarly, to specify that the accepts all requests sent to a port, replace the host element with the "+" character. For example, *https://+:8080*. The "\*" and "+" characters can be present in prefixes that include paths. - Starting with .NET Framework 4.6 and Windows 10, wildcard subdomains are supported in URI prefixes that are managed by an object. To specify a wildcard subdomain, use the "\*" character as part of the hostname in a URI prefix. For example, *http://\*.foo.com/*. Pass this as the argument to the HttpListenerPrefixCollection.Add method. This works on .NET Framework 4.6 and Windows 10; in earlier versions, this generates an . + Starting with .NET Framework 4.6 and Windows 10, wildcard subdomains are supported in URI prefixes that are managed by an object. To specify a wildcard subdomain, use the "\*" character as part of the hostname in a URI prefix. For example, *http://\*.foo.com/*. Pass this as the argument to the method. This works on .NET Framework 4.6 and Windows 10; in earlier versions, this generates an . To begin listening for requests from clients, add the URI prefixes to the collection and call the method. offers both synchronous and asynchronous models for processing client requests. Requests and their associated responses are accessed using the object returned by the method or its asynchronous counterparts, the and methods. From ac33f6410caceeff8179deb5d19d3290bf566e38 Mon Sep 17 00:00:00 2001 From: Scott Addie Date: Mon, 5 Mar 2018 15:28:03 -0600 Subject: [PATCH 5/8] Add note about netsh.exe --- xml/System.Net/HttpListener.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Net/HttpListener.xml b/xml/System.Net/HttpListener.xml index 1c8c940214e2e..3a07729f46608 100644 --- a/xml/System.Net/HttpListener.xml +++ b/xml/System.Net/HttpListener.xml @@ -53,7 +53,7 @@ > If you create an using https, you must select a Server Certificate for that listener. Otherwise, an query of this will fail with an unexpected close of the connection. > [!NOTE] -> You can configure Server Certificates and other listener options by using HttpCfg.exe. See [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/http/http/httpcfg_exe.asp](http://msdn.microsoft.com/library/default.asp?url=/library/http/http/httpcfg_exe.asp) for more details. The executable is shipped with Windows Server 2003, or can be built from source code available in the Platform SDK. +> You can configure Server Certificates and other listener options by using Network Shell (netsh.exe). See [Network Shell (Netsh)](/windows-server/networking/technologies/netsh/netsh) for more details. The executable ships with Windows Server 2016 and Windows 10. > [!NOTE] > If you specify multiple authentication schemes for the , the listener will challenge clients in the following order: `Negotiate`, `NTLM`, `Digest`, and then `Basic`. From 3c41fadd3c454dc956aaaeffeecd5d14e7d51853 Mon Sep 17 00:00:00 2001 From: Scott Addie Date: Mon, 5 Mar 2018 15:29:24 -0600 Subject: [PATCH 6/8] Verbiage tweak --- xml/System.Net/HttpListener.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Net/HttpListener.xml b/xml/System.Net/HttpListener.xml index 3a07729f46608..c48a9e92b08d3 100644 --- a/xml/System.Net/HttpListener.xml +++ b/xml/System.Net/HttpListener.xml @@ -53,7 +53,7 @@ > If you create an using https, you must select a Server Certificate for that listener. Otherwise, an query of this will fail with an unexpected close of the connection. > [!NOTE] -> You can configure Server Certificates and other listener options by using Network Shell (netsh.exe). See [Network Shell (Netsh)](/windows-server/networking/technologies/netsh/netsh) for more details. The executable ships with Windows Server 2016 and Windows 10. +> You can configure Server Certificates and other listener options by using Network Shell (netsh.exe). See [Network Shell (Netsh)](/windows-server/networking/technologies/netsh/netsh) for more details. The executable began shipping with Windows Server 2016 and Windows 10. > [!NOTE] > If you specify multiple authentication schemes for the , the listener will challenge clients in the following order: `Negotiate`, `NTLM`, `Digest`, and then `Basic`. From e2fd7f7cfec9a139cd8c395cbed5792d0a44dc56 Mon Sep 17 00:00:00 2001 From: Scott Addie Date: Mon, 5 Mar 2018 16:08:45 -0600 Subject: [PATCH 7/8] Add .NET Core support language --- xml/System.Net/HttpListener.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Net/HttpListener.xml b/xml/System.Net/HttpListener.xml index c48a9e92b08d3..8d8e08ef0836a 100644 --- a/xml/System.Net/HttpListener.xml +++ b/xml/System.Net/HttpListener.xml @@ -37,7 +37,7 @@ When a port is specified, the host element can be replaced with "\*" to indicate that the accepts requests sent to the port if the requested URI does not match any other prefix. For example, to receive all requests sent to port 8080 when the requested URI is not handled by any , the prefix is *http://\*:8080/*. Similarly, to specify that the accepts all requests sent to a port, replace the host element with the "+" character. For example, *https://+:8080*. The "\*" and "+" characters can be present in prefixes that include paths. - Starting with .NET Framework 4.6 and Windows 10, wildcard subdomains are supported in URI prefixes that are managed by an object. To specify a wildcard subdomain, use the "\*" character as part of the hostname in a URI prefix. For example, *http://\*.foo.com/*. Pass this as the argument to the method. This works on .NET Framework 4.6 and Windows 10; in earlier versions, this generates an . + Starting with .NET Core 2.0 or .NET Framework 4.6 on Windows 10, wildcard subdomains are supported in URI prefixes that are managed by an object. To specify a wildcard subdomain, use the "\*" character as part of the hostname in a URI prefix. For example, *http://\*.foo.com/*. Pass this as the argument to the method. This works as of .NET Core 2.0 or .NET Framework 4.6 on Windows 10; in earlier versions, this generates an . To begin listening for requests from clients, add the URI prefixes to the collection and call the method. offers both synchronous and asynchronous models for processing client requests. Requests and their associated responses are accessed using the object returned by the method or its asynchronous counterparts, the and methods. From 9e4323c690acc5bca8c3a43d69acae839d2f1259 Mon Sep 17 00:00:00 2001 From: Scott Addie Date: Tue, 6 Mar 2018 12:04:14 -0600 Subject: [PATCH 8/8] Update product version numbers --- xml/System.Net/HttpListener.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Net/HttpListener.xml b/xml/System.Net/HttpListener.xml index 8d8e08ef0836a..91a83ec306a15 100644 --- a/xml/System.Net/HttpListener.xml +++ b/xml/System.Net/HttpListener.xml @@ -53,7 +53,7 @@ > If you create an using https, you must select a Server Certificate for that listener. Otherwise, an query of this will fail with an unexpected close of the connection. > [!NOTE] -> You can configure Server Certificates and other listener options by using Network Shell (netsh.exe). See [Network Shell (Netsh)](/windows-server/networking/technologies/netsh/netsh) for more details. The executable began shipping with Windows Server 2016 and Windows 10. +> You can configure Server Certificates and other listener options by using Network Shell (netsh.exe). See [Network Shell (Netsh)](/windows-server/networking/technologies/netsh/netsh) for more details. The executable began shipping with Windows Server 2008 and Windows Vista. > [!NOTE] > If you specify multiple authentication schemes for the , the listener will challenge clients in the following order: `Negotiate`, `NTLM`, `Digest`, and then `Basic`.