find and solve || findandsolve.com
Please wait.....

HTTP Error 500.35 - ASP.NET Core does not support multiple apps in the same app pool

 HTTP Error 500.35 - ASP.NET Core does not support multiple apps in the same app pool


HTTP Error 500.35 - ASP.NET Core does not support multiple apps in the same app pool

Common solutions to this issue:

Select a different app pool to host this app.

Troubleshooting steps:
  • Check the system event log for error messages
  • Enable logging the application process' stdout messages
  • Attach a debugger to the application process and inspect

When i have try to host my .NET 5 Core Applilcation in IIS,this types of error has been occured.


Answer


Option 1.

Solved this issue from .csproj file

Open the .csproj file and add the below property to apply the proper hosting model.

<PropertyGroup>
   <TargetFramework>net5.0</TargetFramework>
   <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
</PropertyGroup>

Solved this issue from  web.config

In ASP.NET Core apps we don't have web.config so first, we have to publish your applilcation or app and in the published folder you can see there your web.config the file generated by .NET 5 Core. Now published the applicationi you have created earlier and open the config file.like as given below.

<?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=".\DotNetCoreApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="OutOfProcess" />     </system.webServer>
  </location>
</configuration>

In the given above code i have mentioned earlier from .NET 5 Core , the In-process hosting model is the default model. So if you want to change it to other i.e. Out -of-process then you just need to change hostingModel="OutOfProcess".


Option 2.

 In VS2019 

  1. Close your solution
  2. Delete applicationhost.config in folder .vs or delete the whole .vs folder.
  3. The .vs is a hidden folder and is next to your solution file usually.
  4. Restart your solution again


Mahira  khanna

Mahira khanna

I have the skills you need for you company blog, website, or other content materials

Comments



Report Response