I. Webhostbuilder configuring URLs and ports for listening useurls ()
1. The default ASP. NET core project bindings http://localhost:5000
. UseUrls
Edit urls
command-line arguments by using extension methods
2. Specify the format: http://xxx:xxx, such as: http://*:81
varHost =NewWebhostbuilder ()// . Useurls ("http://localhost: 5003 ","http://www.sqlme.com: ")//. Useurls ("http://*:8000 "). Useurls ("http://www.sqlme.com:8000") . Usekestrel (). Usecontentroot (Directory.GetCurrentDirectory ()). Useiisintegration (). Usestartup<Startup>() . Useapplicationinsights (). Build ();
3. If the current machine already has server software such as IIS installed, then listening on port 80 throws an exception.
4. If you share a port with a different domain name, you can refer to the Weblistener
Ii. about the ASP. NET Core Weblistener Server
Weblistener supports the following features:
- Windows Authentication
- Port sharing
- HTTPS with SNI
- HTTP/2 over TLS (Windows 10)
- Direct file Transmission
- Response Caching
- WebSockets (Windows 8)
Supported versions of Windows:
- Windows 7 and Windows Server version R2 and later
More:
Mailkit. Net Core Mail delivery
ASP. NET Core Webapi Getting Started (iii) cross-domain processing
JSON serialization processing in ASP.
ASP. NET core publishing bound domain name and port