I have property group like this in my .csproj file
<PropertyGroup> <TargetFramework>netcoreapp2.2</TargetFramework> <AspNetCoreModuleName>AspNetCoreModule</AspNetCoreModuleName> <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel> </PropertyGroup> and yet when publishing to the server with dotnet publish /p:PublishProfile=ITProfile in the server my web.config does look like this:
<?xml version="1.0" encoding="utf-8"?> <configuration> <location path="." inheritInChildApplications="false"> <system.webServer> <handlers> <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> </handlers> <aspNetCore processPath="dotnet" arguments=".\Turvasuunnitelma.Backend.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess"> <environmentVariables> <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="IT" /> </environmentVariables> </aspNetCore> </system.webServer> The published has hostingModel set to "InProcess", so whats going on? Where does it get the values to the web.config when it's generated?
And im not using the InProcess because it gives me HTTP Error 500.0 - ANCM In-Process Handler Load Failure. Dont know if it's the old IIS or what is going on, installed the newest hosting modules etc, have the AspNetCoreModuleV2 in modules in IIS as expected.
1 Answer
And im not using the InProcess because it gives me HTTP Error 500.0 - ANCM In-Process Handler Load Failure. Dont know if it's the old IIS or what is going on, installed the newest hosting modules etc, have the AspNetCoreModuleV2 in modules in IIS as expected. When you use In Processes, you need to use a standalone AppDomain.
In your IIS, simply create a new Appdomain, with the No-Managed-Code Option
Put your app in that new appdomain.
That solves this issues.
The documentation for .net-core In-Process hosting on IIS states that it requires a standalone app-domain