Deploying an ASP.NET Core application to IIS is the preferred choice when hosting on different Windows OSes (machines or servers).
It's important to understand how IIS will work with ASP.NET Core apps. In the preceding section, we published the application to the output folder containing all the artefacts for running it.
The famous web.config also exists in the published folder. Examine the content to understand how IIS and ASP.NET Core work together:
<?xml version="1.0" encoding="utf-8"?> <configuration> <!-- Configure your application settings in appsettings.json.
Learn more at http://go.microsoft.com/fwlink/?LinkId=786380 --> <system.webServer> <handlers> <add name="aspNetCore" path="*" verb="*"
modules...