Release. NET Core to IIS and. netcoreiis
Directory:
- Supported Operating Systems
- IIS configuration
- Install. NET Core Windows Server Hosting
- Deploy applications
- Configure the website in IIS
- Create a data protection registry entry
- Common Errors
- Additional resources
Supported Operating Systems
The following operating systems are supported:
- Windows 7 and later versions
- Windows Server 2008 R2 and later versions
IIS configuration
EnableWeb Server (IIS)Server role to create a role service.
Windows desktop OS
EnterControl Panel> Programs and functions> enable or disable windows functions. OpenInternet Information Services,Open IISWeb management toolsAndWorld Wide Web Service.
Windows Server Operating System
Server operating system, useAdd role and function wizardEnable the IIS function of the server.
InRole ServiceIn the step, select the desired IIS service role or accept the default role service.
Continue to passConfirmTo enable web Server roles and services.
Install. NET Core Windows Server Hosting
- Install. NET Core Windows Server Hosting on the Server. It will install the. NET Core Runtime,. NET Core Runtime Library, and ASP. NET Core module. This module can create a response proxy between IIS and the Kestrel server.
- RunIisresetCommand or restart the iis service.
Deploy applications
- On the IIS server, create a. NET Core Release folder that contains the published project file.
- Create a folderLogsFolder to save application logs (only if logging is enabled ). Skip this step if no logs are recorded.
- Deploy the application to the folder created on the target IIS server. For Web deployment information, see publish and IIS Web deployment using Visual Studio.
Warning
The. NET Core application carries a reverse proxy between IIS and the Kestrel server. To create a reverse proxy, the web. config configuration file must have the root directory of the deployment path.
Configure the website in IIS
- InIIS ManagerTo create a new website. EnterWebsite nameAnd setPhysical pathFolder. SetBindAnd then create a website.
- Set the application pool for the websiteUnmanaged code. ASP. NET Core runs in a separate process.
OpenAdd websiteWindow.
Configure the website.
InApplication poolPanel, openEdit application poolRight-click the window and selectBasic settings.
Set. Net clr versionIsNoneManaged code.
Browse the website.