Translated from Https://docs.microsoft.com/en-us/aspnet/core/publishing/iis
Supported Operating systems:
Windows 7 or update
Windows Server R2 or update
IIS Configuration
Enable Web server and configure related options
Windows Desktop Edition system
Windows Server Edition operating system
Install the. NET core Windows Server hosting Toolkit
1. Install the. NET Core Windows Server Hosting bundle:https://aka.ms/dotnetcore.2.0.0-windowshosting
If the server is not connected to the Internet, you should download and install the Microsoft Visual C + + redistributable https://www.microsoft.com/download/before installing the hosting bundle details.aspx?id=53840
2. Restart the system or perform
>net Stop was/y
>net start w3svc
Install Web Deploy when publishing with VisualStudio
If you want to deploy your app with Web deploy within VS, install the latest version of Web deploy on the host system.
To install Web Deploy, you can use the Web Platform Installer (WEBPI) https://www.microsoft.com/web/downloads/platform.aspx
or download directly from Microsoft Download Center (HTTPS://WWW.MICROSOFT.COM/SEARCH/RESULT.ASPX?Q=WEBDEPLOY&FORM=DLC) (note link not available)
Application Configuration
1. Enable Iisintegration component
Contains the dependencies Microsoft.AspNetCore.Server.IISIntegration
Add code to the Program.cs
var New Webhostbuilder () . Usekestrel () . Usecontentroot (Directory.GetCurrentDirectory ()) . Useiisintegration () . Usestartup<Startup>() . Build ();
2. Configure Iisoptions
3. Web. config
Create an IIS Web site
(Note: This management interface differs greatly from the IIS management interface of Windows7, where this configuration fails and does not go down)
The Windows IIS service provider configures an ASP. NET core server in a bad environment and deploys