This error is often thrown if you host two .net applications on the same application pool using in-process hosting.
Let's discuss how our specialist team resolves this frequently faced issue.
- If you have hosted two sites on the same application pool. Let's say site1 uses the in-process, and site2 uses the out-process. It requires you to know that the worker process can't run both in process. To resolve this, run the different app in the different application pools.
- Another solution requires you to change the hosting mode to out-process. Open the web.config file and search out the tag <system.webServer>. Once you obtain the tag, explore the code below.
<aspNetCore processPath="dotnet" arguments=".\yourapplication.dll"
stdoutLogEnabled="true" stdoutLogFile=".\logs\stdoutlog" hostingModel="inprocess" />
And replace it with the below code.
<aspNetCore processPath="dotnet" arguments=".\yourapplication.dll"
stdoutLogEnabled="true" stdoutLogFile=".\logs\stdoutlog" hostingModel="outprocess" />