Repository navigation
Fix escape characters in HttpListener Remarks section - #4495
Conversation
scottaddie
commented
Feb 26, 2018
- Properly escape special characters to fix display issues in Remarks section
- Replace .NET 4.5.3 references with .NET 4.6
mairaw
left a comment
There was a problem hiding this comment.
Thanks for noticing this problem @scottaddie. Left a few comments.
| When a port is specified, the host element can be replaced with "\*" to indicate that the <xref:System.Net.HttpListener> 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 <xref:System.Net.HttpListener>, the prefix is *http://\*:8080/*. Similarly, to specify that the <xref:System.Net.HttpListener> 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 <xref:System.Net.HttpListener> 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 <xref:System.Net.HttpListenerException> | ||
| Starting with .NET 4.6 and Windows 10, wildcard subdomains are supported in URI prefixes that are managed by an <xref:System.Net.HttpListener> 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 <xref:System.Net.HttpListenerException>. |
There was a problem hiding this comment.
It should be .NET Framework, not just .NET
will work -> works
would generate -> generates
Perhaps add the xref link to the Add method?
Do we know how this works in Core?
There was a problem hiding this comment.
@mairaw Not sure if I got the xref link syntax correct. This is my best guess.
|
|
||
| > [!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 <xref:System.Net.HttpListener> object on a computer that is running an earlier operating system, the constructor throws a <xref:System.PlatformNotSupportedException> 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 <xref:System.Net.HttpListener> object on a computer that is running an earlier operating system, the constructor throws a <xref:System.PlatformNotSupportedException> exception. |
There was a problem hiding this comment.
should we just remove this note? anything older than these versions is probably out of support. #Resolved
| When a port is specified, the host element can be replaced with "\*" to indicate that the <xref:System.Net.HttpListener> 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 <xref:System.Net.HttpListener>, the prefix is *http://\*:8080/*. Similarly, to specify that the <xref:System.Net.HttpListener> 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 <xref:System.Net.HttpListener> 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 <xref:System.Net.HttpListenerException> | ||
| Starting with .NET Framework 4.6 and Windows 10, wildcard subdomains are supported in URI prefixes that are managed by an <xref:System.Net.HttpListener> 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 <xref:System.Net.HttpListenerPrefixCollection.Add%2A> method. This works on .NET Framework 4.6 and Windows 10; in earlier versions, this generates an <xref:System.Net.HttpListenerException>. |
There was a problem hiding this comment.
This works on .NET Framework 4.6 and Windows 10 -> this statement is not future-proof and incorrect given that we're already on .NET Framework 4.7.1. (sorry I missed this the first time). would be good to know if this is the same way in Core. Maybe @pjanotti or @davidsh can help here.
xref link worked!
There was a problem hiding this comment.
.NET Core has supported the same behavior since at least 2.0. If I had to guess the support was probably added much earlier, but I'm having trouble verifying that.
There was a problem hiding this comment.
@Tratcher Do you know anything about when this support was added?
There was a problem hiding this comment.
It was pretty recent. The IIS docs say it came in IIS 10.
https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-10/wildcard-host-header-support
|
|
||
| > [!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. |
There was a problem hiding this comment.
You should be able to make the same Http.Sys configuration changes using netsh, so I think that would be a good change.
|
@rmkerr PTAL |
| When a port is specified, the host element can be replaced with "\*" to indicate that the <xref:System.Net.HttpListener> 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 <xref:System.Net.HttpListener>, the prefix is *http://\*:8080/*. Similarly, to specify that the <xref:System.Net.HttpListener> 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 <xref:System.Net.HttpListener> 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 <xref:System.Net.HttpListenerException> | ||
| Starting with .NET Framework 4.6 and Windows 10, wildcard subdomains are supported in URI prefixes that are managed by an <xref:System.Net.HttpListener> 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 <xref:System.Net.HttpListenerPrefixCollection.Add%2A> method. This works on .NET Framework 4.6 and Windows 10; in earlier versions, this generates an <xref:System.Net.HttpListenerException>. |
There was a problem hiding this comment.
.NET Core has supported the same behavior since at least 2.0. If I had to guess the support was probably added much earlier, but I'm having trouble verifying that.
|
|
||
| > [!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. |
There was a problem hiding this comment.
You should be able to make the same Http.Sys configuration changes using netsh, so I think that would be a good change.
|
@mairaw This is ready for another look. |
|
|
||
| > [!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 began shipping with Windows Server 2016 and Windows 10. |
There was a problem hiding this comment.
netsh.exe is much older than windows 10. It's been there since Vista or 7.
There was a problem hiding this comment.
|
@mairaw Hoping to get this reviewed again, when you get a chance. |
|
Will take a look today @scottaddie. Sorry for the delay, |
mairaw
left a comment
There was a problem hiding this comment.
Great! Thanks for the fix @scottaddie.
* Fixes and improvements to Semantic analysis Get started (dotnet#4575) * Order the definitions to match the order of terms (dotnet#4576) The introductory sentence could be read as implying definitions that contradict the body of the article. * Fix invalid Windows file system paths (dotnet#4559) * Fix invalid Windows file system paths * Add escape characters * Fixing capitalization of Visual Basic (dotnet#4578) Changed "Visual basic" to "Visual Basic" for the description of the Get Visual Basic link. * Fixed broken links in interop docs (dotnet#4573) * Fixed broken links in interop docs * Updated additional links * Removed 'en-us' from URLs * Fixing broken link to MVA course (dotnet#4580) Visual Basic Fundamentals for Absolute Beginners link was directing to a list of courses, not really related to VB. I've updated the link directly to the course. I did check to see if the course was in other languages before putting in the en-US link - looks like it's available only in English. * Minor refactoring (dotnet#4582) Change "new ValidationResult(true, null)" to "ValidationResult.ValidResult", since it looks a little cleaner and the property was explicitly designed for that use. * Fixed link (dotnet#4583) * Update "How to: Modify string" (dotnet#4519) * article and code moved * interim checkin Switching tasks. * checkin to run test build I want to see if I can use local functions in C# interactive. * finish samples and new draft Ready for my first review. * fix build errors * proofread * update per feedback. * respond to feedback. * additional feedback. * respond to feedback. * Fix escape characters in HttpListener Remarks section (dotnet#4495) * Minor refactoring (dotnet#4584) Change "New ValidationResult(True, Nothing)" to "ValidationResult.ValidResult", since it looks a little cleaner and the property was explicitly designed for that use. * fix title (dotnet#4590) * fix broken links (dotnet#4588) * Add the closing token for an XML include (dotnet#4593) Without this, the rest of the file renders incorrectly. * Correct description of ROOT parameter (dotnet#4595) * Update tuples.md "Interoperation with C# Tuples" content (dotnet#4581) * Removed an excessive "and" * Removed some text that didn't seem overly clear. * Replaced link to UserVoice (dotnet#4594) * Removed link to UserVoice * Changed URL target * Fix typo (dotnet#4599) * Experiment: CodeOwners (dotnet#4597) * Experiment: CodeOwners Trying an experiment to see how we might use use the CODEOWNERS file to get reviews routed to the right person. * Added several sections * Update CODEOWNERS * Fixing anchor link to the "private protected access modifier" section (dotnet#4601) * fixes to the CODEOWNERS (dotnet#4602) * fixes to the CODEOWNERS The changes here: 1. The '@' is needed on each user name. 1. The C# Snippets was missing the 'csharp' directory component. 1. Order is important. * Add F# guide. * modify-string-contents.md: added interactive note (dotnet#4607) * Fix markdown table (dotnet#4603) Fix usage of `|` in markdown (use `|` instead) * Update infrastructure-persistence-layer-implemenation-entity-framework-core.md (dotnet#4610) Update link to the new address to avoid an extra 301 redirect. * csharp-interactive-note.md: style update (dotnet#4606) * parallel-diagnostic-tools.md: removed Visual Studio version (dotnet#4608) * adding missing language identifiers (dotnet#4611) * adding missing language identifiers (dotnet#4612) * adding missing language identifiers (dotnet#4613) * adding missing language identifiers (dotnet#4614) * adding missing language identifiers (dotnet#4615) * adding missing language identifiers (dotnet#4616) * adding missing language identifiers (dotnet#4617) * adding missing language identifiers (dotnet#4618) * adding missing language identifiers (dotnet#4619) * adding missing language identifiers (dotnet#4620) * adding missing language identifiers (dotnet#4621) * adding missing language identifiers (dotnet#4622) * adding missing language identifiers (dotnet#4623) * Fixed some attribute names (dotnet#4629) .NET puts the "Attribute" suffix in all its attribute *classes*, but not in the actual attribute. * Fix "whitespace" words - docs/standard (dotnet#4605) * base-types * fixes by pr rpetrusha * System.Reflection docs for ProcessorArchitecture is misleading (dotnet#4539) * clarify the difference betwen IA64 and AMD64 * Update ProcessorArchitecture.xml * Changed 'integer' to 'integral value' for consistency (dotnet#4586) * 👓 sweep docset for areas where `in` wasn't mentioned but should be (dotnet#4534) * sweep docset for areas where `in` wasn't mentioned but should be * respond to first round of feedback * create in-modifer article Also, update samples and snippets and make corresponding changs to 'ref' and 'out' article. * fix build errors * fix one more build error * wording change based on feedback. * respond to edits * commit changes from that unsaved window Yeah, I did that. Didn't save before committing. * added missing options (dotnet#3390) * Add warning regarding server host configuration (dotnet#4634) * Fix some xrefs (dotnet#4624) * Fix some xrefs * Fixed typo * Change hybrid xref links to normal xrefs * Remove redundant text with bad link * Update compiler-api-model.md (dotnet#4636) fix small typos * Corrected description of verbatim attribute usage (dotnet#4635) * removed sentence about migrating content (dotnet#4532) * removed sentence about migrating content * removed preview * Update the F# Guide page and some ms.date links (dotnet#4521) * Update to F# docs round 1 * yup * fix * feedback * Fix link * feedback * Updates * Updates * Updates * Make comments betteR * Feedback * Feedback * fixes * Improvements to Creating a Type Provider (dotnet#4592) * Improvements to Creating a Type Provider * Fixed assembly attribute * Revision of DateTime.Parse overloads (dotnet#4455) * Revision of DateTime.Parse * Additional modifications * Some further revisions * Additional revisions * Corrected bad XML tags * Moved examples * Additional revisions and .zip files * Added accidentally deleted file * Addressed review comments * keywords/string.md: link verbatim identifier page (dotnet#4639) * C13890: Show code for link in target versions (dotnet#4641) Hello, @BillWagner, Localization team has reported source content issue that causes localized version to have broken format compared to en-us version. Please, help to check my proposed file change into the article and help to merge if you agree with fix. If not, please, let me know either if you would like me to fix it in another way within this PR, if you prefer to fix it in another PR or if I should close this PR as by-design. In case of using another PR, please, let me know of your PR number, so we can confirm and close this PR. Many thanks in advance. * C13891: Show code for link in target versions (dotnet#4642) * Fix incorrect en dashes (dotnet#4644) * replace BNF grammar with ANTL grammar (dotnet#4643) * replace BNF grammar with ANTL grammar The BNF grammar rendering was quite messy. Antlr provides a much more clear rendering on the current engine. * fix typo and update metadata * Added output comment to verbatim string code snippet (dotnet#4646) * added missing entry (dotnet#4648) * simplify template (dotnet#4645) * simplify template * feedback * Fixed broken links to archived interop topics (dotnet#4647) * Changed HSB to HSL color model (dotnet#4652) * Changed HSB to HSL color model * Addressed review comments * Fix connect bug DevDiv # 93543 (dotnet#4653) * fix broken link (dotnet#4655) * Add displayProperty attribute to address customer complaint in SqlParameter.Value docs (dotnet#4660) * Fix connect bug DevDiv # 93543 * Add clarifications to links to address DevDiv Connect Bug # 104024 * add one more displayproperty * including the template in the treeview (dotnet#4662) Adding reference the hierarchical template in the treeview * Replace IIF with IF (dotnet#4665) * Added GetHashCode() implementation to ValueObject (dotnet#4185) This will be very helpful to readers. Picked it up from eShopOnContainers repo. * Provided correct enum members, method overloads (dotnet#4484) * Provided correct enum members, method overloads * Incorporated review comments, corrected other errors * Fixed 2 broken links * Fixed two additional links * Added exception information to SingleOrDefault (dotnet#4650) * Added information on string length >= desired string length (dotnet#4651) * Added information on string length >= desire string length * fixed broken link * Incorporated comments from @svick * TLS best practices (dotnet#4658) * IIF to IF on Tuples page (dotnet#4669) * fix: derrived --> derived typo (dotnet#4673) * Modified contributors guide to reflect contributors' project (dotnet#4666) * Add link to github issue to TLS doc (dotnet#4676) * fix link (dotnet#4672) * fix typo (dotnet#4678) * Remove extra backslash (dotnet#4680) * Fix markdown link (dotnet#4679) * Fix markdown link * feedback * update signalr info for 2.1 preview (dotnet#4681) * Fix typo (dotnet#4683) * fixed typo * fix typo * add PDF to preview serverless e-book (dotnet#4685) * Removed spaces in code (dotnet#4671) * Fixed typo in --x operator description (dotnet#4691) * Add syntax highlighting to inline code in stackalloc (dotnet#4690) Just noticed on docs.microsoft.com that these code blocks don't have syntax highlighting, which does not adhere to the style guide * Add UWP as platform that supports .NET Standard (dotnet#3813) * Add UWP as platform that supports .NET Standard https://blogs.msdn.microsoft.com/dotnet/2017/10/10/announcing-uwp-support-for-net-standard-2-0/ * Add platforms; remove versions; add link Instead of listing the same platforms that are listed on https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support and having to maintain both lists as new versions are released, just mention the platforms here and link to the existing table with versions. Closes dotnet#3814 * feedback * < and > wrong (dotnet#4664) * < and > wrong < and > were not in code * Updated xref Updated xref to correct signature * removing tickmarks and overloads * some other minor fixes * Update net-standard.md (dotnet#4694) * Correct time complexity of List<T>.InsertRange (dotnet#4693) * Operator new doesn't create structs on the stack (dotnet#4667) * Operator new doesn't create structs on the stack * Small improvements to operator new * Structs can contain resources too * Mention garbage collector * Clarified when value types are destroyed