1. Install the. NET Core Framework
Download. NET Core Address: Official address
2.Install IIS
Programs and features in Control Panel-"Internet infomation Services"
3. Site Deployment
Example: HTTPS://GITHUB.COM/ASPNET/MVC
In IIS Manager, the physical path, new site, is the root directory for the project.
Site bindings:
Add 127.0.0.1 mvcsanbox.cn to the host file to refresh the DNS cache: Cmd->ipconfig/flushdns
Set the host domain name to: mvcsanbox.cn Port: 80
4. Install. NET Core Windows Server Hosting
:. NET Core Windows Server Hosting
5. Set up Web. config for a website
<?xml version= "1.0"?><configuration> <system.webServer> <directorybrowse enabled= " True "/>
Parameter description:
Attribute |
Description |
processpath |
Required string attribute. Path to the executable That would launch a process listening for HTTP requests. Relative paths is supported. If the path begins with '. ', the path was considered to being relative to the site root. There is no default value . |
arguments |
Optional string attribute. Arguments to the Executable specified in processpath. The default value is an Empty string. |
startuptimelimit |
optional integer attribute. Duration in seconds The module would wait for the executable-start a process listening on the port. If this time limit is exceeded, the module would kill the process. The module would attempt to launch the process again when it receives a new request and would continue to attempt to restart The process on subsequent incoming requests unless the application fails to Start rapidfailsperminute number of Times in the last rolling minute. The default value is. |
shutdowntimelimit |
optional integer attribute. Duration in seconds for which the module would wait for the executable to gracefully shutdown when Theapp_offline.htm file was detected. The default value is. |
rapidfailsperminute |
optional integer attribute. Specifies the number of Times the process specified In processpath is allowed to crash per minute. If this limit is exceeded, the module would stop launching the process for the remainder of the minute. The default value is. |
requesttimeout |
optional TimeSpan attribute. Specifies the duration for which the ASP. NET Core Module would wait for a response from the process listening on%aspnetcore_port%. The default value is " 00:02:00 ". |
stdoutlogenabled |
optional Boolean attribute. If true, stdout and stderr for The process specified In processpath will is redirected to the file specified in stdoutlogfile. The default value is False. |
stdoutlogfile |
optional string attribute. Specifies the relative or absolute file path for Which stdout and stderr from the process specified inprocesspath would be logged. Relative paths is Relative to the root of the site. Any path starting with '. ' is relative to the site root and all other paths would be treated as absolute paths. A timestamp and the file extension would automatically be added to the filename provided. Any folders provided in the path must exist in order for the module to create the log file. The default value is aspnetcore-stdout . |
Forwardwindowsauthtoken |
true or false. &NBSP; if True, the token is forwarded to the child process listening on%aspnetcore_por t% as a header ' Ms-aspnetcore-winauthtoken ' per request. It is the responsibility of the so process to call CloseHandle on this token per request. The default value is False. |
Disablestartuperrorpage |
True or FALSE. If true, the 502.5-process Failure page would be is suppressed, and the 502 Status code page configured in your Web. config W ill take precedence. + The default value is False. |
Reference Address:
Https://docs.microsoft.com/en-us/aspnet/core/publishing/iis#common-errors
Https://docs.microsoft.com/en-us/aspnet/core/publishing/iis#iis-configuration
Https://docs.microsoft.com/en-us/aspnet/core/hosting/aspnet-core-module
"Set a small target." ASP. NET Core managed to run on IIS