Screenclip on ANCM error

Introduction

Recently, while deploying several RESTFUL web services built using .NET Core, IIS was serving an HTTP Error. The services all run under the main IIS website, each in their own Application Pool. After some searching, I found that the issue was related to the AspNetCoreHostingModel been set to InProcess. This is visible in the web.config file.

The Fix

Unload the project in Visual Studio and Edit the *.csproj file. Look for the node:

<PropertyGroup> <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> </PropertyGroup>

Either remove the line AspNetCoreHostingModel or change the value to OutOfProcess.

Save and reload the project. Now when you deploy the hosting model will no longer set the value 'InProcess' in the web.config file. The site should now start fine and you will no longer get the exception page.