I have .NET Core web application targeting net461
framework. And I tried to publish it to IIS. What I have followed this guide and after accessing page I got this:
I checked following:
- There is folder .\logs\stdout and IIS has full control to read/write, logging is enabled but not log file is created
- AppPool has selected No Managed Code
- In Event Viewer no errors are shown under Windows Logs/Application
- In IIS logs there is no useful information
Then I decided that I'll make empty .NET Core app also target net461
and deploy it to IIS. I followed exact same steps and this empty "Hello World!" app works.
Then I noticed that application that does not work have ASP.NET section and other don't. Why is that?
stdoutLogEnabled="true"
attribute on your<aspNetCore />
element in your web.config? – willwolfram18net461
framework with .NET Core web application. Can you right click your asp.net web application project in Solution explorer and then click Edit and check the<TargetFramework>
. I think your web application is targeting .NET Framework and not .NET Core thats why when you are trying to host it under AppPool withNo Managed Code
it is causing error – Mohsin Mehmoodnet461
framework and runs under AppPool withNo Managed Code
– Matjaž Mav