Make sure you've done the following:
- Installed latest Core hosting bundle. If not, go here and look for "Hosting Bundle" https://dotnet.microsoft.com/download/dotnet-core/3.1 (you should go there on regular basis, a new version about every month, latest is 3.1.7 when writing this)
- In app pool, make sure .NET framework is not selected
When publish, use
Deployment Mode = Framework-Dependent
Target Runtime = win-x64
In your publish profile (you find this file in project folder /Properties/PublishProfiles/YourProfileName.pubxml) after saving the profile, you'll need
Production
InProcess
InProcess is the fastest option when using IIS. When running publish, this will end up in your generated web.config like this
When deploying to a staging server, create a new publish profile, and use
Staging
InProcess
When you get answer from
https://localhost:5001/
you are running Kestrel, not IIS