Unlike the asp.net era, asp.net core is no longer hosted by the IIS worker process (w3wp.exe), but runs independently. It runs independently in the console application and is invoked through the Dotnet Runtime command. It has not been loaded into the IIS worker process, but IIS has loaded a local module named Aspnetcoremodule, which is used to perform external console programs. Before you deploy, make sure that you have the Aspnetcoremodule managed module installed on your IIS, and if not, click here to download and install it to complete the following diagram: Step one: New project asp.net Core Web application, as shown in figure: Step Two: Publish the method Select the file system, and then set a publish path The third step: the configuration file can be based on your online, offline environment to choose, because it is based on the. NET Core, so the target framework is netcoreapp2.0, and then save the release, as shown in figure:
Fourth Step: of course, you can also be based on the CLI Publish command to publish, simply switch to the LIGHT.API root directory, enter the following command
dotnet Publish--framework netcoreapp1.1--output "E:\Publish"--configuration release
The framework represents the target framework, output represents the directory folder to publish to, and configuration represents the configuration file, which is equivalent to the actions we publish through the manager, as shown in the figure:
Step Fifth: adding Web sites in IIS
Setting the application pool's. NET CLR version is "unmanaged code", as I said earlier, IIS is a role as a reverse proxy and does not need it to host code
OK, it's done, browse our website
next article: asp.net core2.0 deployment centos7/ Linux system-Install deployment (i)