
Question:
I have an asp.net core 2.0 hosted locally on IIS 10. For some reason DefaultAppPool keeps stopping as soon as I hit the hosted website. And I am getting HTTP Error 503. The service is unavailable.
In event logs I see following error;
<blockquote>The Module DLL C:\WINDOWS\system32\inetsrv\aspnetcore.dll failed to load. The data is the error.
</blockquote>When I check the path C:\WINDOWS\system32\inetsrv\
I do not see aspnetcore.dll
exists. Should it be there? If yes, .net core installation exe shouldn't be copy it?
Here are some information below;
<a href="https://i.stack.imgur.com/dcrcX.png" rel="nofollow"><img alt="core installed" class="b-lazy" data-src="https://i.stack.imgur.com/dcrcX.png" data-original="https://i.stack.imgur.com/dcrcX.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>
<a href="https://i.stack.imgur.com/ykIbU.png" rel="nofollow"><img alt="IIS App Pool" class="b-lazy" data-src="https://i.stack.imgur.com/ykIbU.png" data-original="https://i.stack.imgur.com/ykIbU.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>
<a href="https://i.stack.imgur.com/7xqm6.png" rel="nofollow"><img alt="Event Logs" class="b-lazy" data-src="https://i.stack.imgur.com/7xqm6.png" data-original="https://i.stack.imgur.com/7xqm6.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>
<a href="https://i.stack.imgur.com/g33NT.png" rel="nofollow"><img alt="intesrv" class="b-lazy" data-src="https://i.stack.imgur.com/g33NT.png" data-original="https://i.stack.imgur.com/g33NT.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>
What I tried, and did not worked?
<ol><li><a href="https://orcharddojo.net/blog/troubleshooting-iis-apppool-crashes-status-503-after-windows-10-anniversary-update" rel="nofollow">Troubleshooting IIS AppPool crashes</a> </li> <li>Uninstalled .net core and reinstalled.</li> <li>Changed App Pool Identity to Network Service etc.</li> </ol>Any idea how I can fix this?
Answer1:For hosting .Net Core applications in IIS, .Net CLR Version of application pool should be No Managed Code as shown in below screenshot. If you don't see "No Managed Code" option in in dropdown then you need to install .Net Core Hosting Bundle. <a href="https://i.stack.imgur.com/6rhcM.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/6rhcM.png" data-original="https://i.stack.imgur.com/6rhcM.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>
Answer2:Ensure you have .NET Core Hosting Bundle installed as mentioned here: <a href="https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.1&tabs=aspnetcore2x" rel="nofollow">https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.1&tabs=aspnetcore2x</a>