I\'m setting up the first site in IIS on Windows Server 2016 Standard.
This is a NET Core 2.2
application. I cannot get the site to show.
I am getting th
For me it was because I had ASPNETCORE_ENVIRONMENT environment variable being defined 2 times in my app - one in web.config and another - in applicationhost.config
Delete the 'hosting Model ="in process"' section in web config.
Example:
<aspNetCore processPath="dotnet" arguments=".\WebAPICore.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
to
<aspNetCore processPath="dotnet" arguments=".\WebAPICore.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
In my case updating .net core sdk works fine.
In my case just adding MVC into Startup.cs Please follow into image. I am trying to add dependency injection then showing this problem. I think it will be helpful. Follow this Image: https://i.stack.imgur.com/ykw8P.png