Configuring dotnet core app on IIS
These instructions are for running a dotnet core website on IIS server instead of kestrel
1. Get the needed dotnet runtime download file.
Depending on the dotnet core version that the app was build on, dotnet core 5 is the latest, so go to dotnet.microsoft.com and choose download from menu. on the .net 5.0 side, click on all .net downloads. Click on .net 5.0 (recommended). Look for the Hosting bundle X64 link and download it. This file will need to be installed on the server that is running IIS.
2. VS deployment
Open VS and load your dotnet core solution. Under build menu item, choose Publish "your solution name". Assuming you have a publish profile already configured, this will build your code and publish it to the folder that you configured in the publish profile. Copy the files in this folder to the IIS server under Inetpub/wwwroot/ folder name for your app.
3. IIS configuration
create a new IIS site. This will also create an application pool for it. Find the application pool that was created and change the .NET CLR version to No Managed code.
4. If you use windows auth
under the site authentication settings, make sure anonymous auth is disabled and windows auth is enabled. So will also need to make sure the site URL matches a name for the server or windows auth will not work properly.