Getting Error HTTP Error 500.34 - ANCM Mixed Hosting Models Not Supported after HTTP Error 500.35 - ANCM Multiple Hosting models not supported

Viewed 5940

I am getting error "Error HTTP Error 500.34 - ANCM Mixed Hosting Models Not Supported" after adding

    <PropertyGroup>
     <TargetFramework>netcoreapp3.1</TargetFramework>
     <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
   </PropertyGroup>

to my application.config.host, I was trying to resolve HTTP Error 500.35 - ANCM Multiple Hosting models not supported by adding above code snippet to application.config.host. Any help would be appreciated. Thanks

4 Answers

This issu occured because you may have different hosting model on you web apps under the same server where you have hosted your all web apps ,so you need to change hosting model for all ur web apps to be outofprocess by adding below line

<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>

I got the same error when I changed target SDK to .Net Core 3.1. My solution was remove hostingModel="inprocess" from aspNetCore tag in file web.config.

Sure it can be made cleaner, but at least the app works. Hope it may help someone.

<aspNetCore processPath="dotnet" arguments=".\XXXXXXX.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess"/>

I got it resolved.

I was loking for my applicationhost.config file in the .vs folder, to start i was unble to find .vs folder in my project folder. I manually typed C:\Users\v-wauddi\Desktop\Dutch Treat\DutchTreat.vs\DutchTreat\config\applicationhost.config and i was able to get applicationhost.config, I saw an unusual entry, I fixed it by commenting that unsual entry which can be seen in the below code.

<site name="DutchTreat" id="2">
    <application path="/" applicationPool="DutchTreat AppPool">
      <virtualDirectory path="/" physicalPath="C:\Users\v- 
         wauddi\Desktop\Dutch Treat\DutchTreat\DutchTreat" />
    </application>

    //commented out section
    <!--<application path="/App" applicationPool="App AppPool">
      <virtualDirectory path="/" physicalPath="C:\Users\v- 
         wauddi\Desktop\Dutch Treat\DutchTreat\DutchTreat" />
    </application>-->

      <bindings>
      <binding protocol="http" bindingInformation="*:8888:localhost" />
    </bindings>
  </site>

I was going mad due to this issue from last 30-40 minutes. At last I deleted the .vs folder and reopened the project.

It works like charm.

Steps:

  • Open your solution folder.

  • exit project and close visual studio.

  • delete the vs folder, it might be hidden, so you need to enable
    hidden items as shown below :

enter image description here

At last reopen project, it will take some extra seconds to reconstruct the files in .vs folder.

Related