Running a .Net Core Web Application

Running the code locally your IDE does the work for you but when you deploy to a web server you will need to make some changes / configuration updates:

  1. Install both the .net core SDK and Runtime
    1. https://www.microsoft.com/net/download/all
    2. For the .Net Core Runtime you will want the Hosting Bundle Installer
    3. Reboot the host
  2. Update the sites Application Pool , set the .NET CLR version to No Managed Code
  3. Update the service configuration for IISOptions in ConfigureServices
    1. This will be in ‘Startup.cs’ (see below)
1
2
3
4
services.Configure<IISOptions>(options => 
{
options.ForwardClientCertificate = false;
});

You may also need to update the BuildWebHost method in ‘Program.cs’ to include:

1
.UseContentRoot("c:\\yoursitedir")=

References