HTTP Error 500.35 - ANCM Multiple In-Process Applications in same Process ASP.NET Core 3


From this morning without any changes to the code of the project, a very simple Web API, one controller and 3 methods, with Swagger, it doesn't start anymore and I get the error:

HTTP Error 500.35 - ANCM Multiple In-Process Applications in same Process

Event viewer report the most useless message:

IIS Express AspNetCore Module V2: Failed to start application '/LM/W3SVC/2/ROOT/docs', ErrorCode '0x80004005'.

Restarted the system several times.

I'm using Visual Studio 2019, the application successfully compile and a few minutes ago it was working fine. No new software has been installed, no packages added. Tried also clean and rebuild.

I've just modified the comment of a method. Obviously I've tried also to restore the previous comment but I get always the same message.

What can I do?

Is net core still too unstable to be used professionally?


The same code launched from the same version of Visual Studio but in another PC runs properly.


Below the code of the application:


using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using System;
using System.IO;
using System.Reflection;

namespace WFP_GeoAPIs
    public class Startup
        public Startup(IConfiguration configuration)
            Configuration = configuration;

        public IConfiguration Configuration { get; }

        public void ConfigureServices(IServiceCollection services)

            services.AddSwaggerGen(c =>
                c.SwaggerDoc("v1", new OpenApiInfo() { Title = "Geographic APIs", Version = "v1.0.0" });
                var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.XML";
                var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);    

        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
            if (env.IsDevelopment())

            app.UseStaticFiles(new StaticFileOptions
                FileProvider = new PhysicalFileProvider(
                 Path.Combine(Directory.GetCurrentDirectory(), "swagger-ui")),
                RequestPath = "/swagger-ui"


            app.UseEndpoints(endpoints =>

            app.UseSwaggerUI(c =>
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "GeoAPIs Ver 1.0.0");
                c.RoutePrefix = "docs";

Here is the launchsettings.json:

  "$schema": "",
  "iisSettings": {
    "windowsAuthentication": false, 
    "anonymousAuthentication": true, 
    "iisExpress": {
      "applicationUrl": "http://localhost:51319",
      "sslPort": 44345
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "launchUrl": "docs",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
    "WFP_GeoAPIs": {
      "commandName": "Project",
      "launchBrowser": true,
      "launchUrl": "docs",
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"

but coping the project on another PC with the same Visual Studio version works fine, so it looks like the is a configuration bug in the .NET Core or VIsual Studio property...

asked on Stack Overflow Oct 5, 2019 by Giox • edited Oct 5, 2019 by Giox

3 Answers


Thanks to @Lex Li he has given me the solution.

The issue was in the applicationhost.config, the metabase file containing all the settings for the IISExpress launch by Visual Studio to run your web application.

For Visual Studio 2019, this file is located in


For other version check this post: Where is the IIS Express configuration / metabase file found?

under the section I had the following:

  <site name="WebSite1" id="1" serverAutoStart="true">
    <application path="/">
      <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
      <binding protocol="http" bindingInformation=":8080:localhost" />

  <site name="MyProjectName" id="2">
    <application path="/" applicationPool="MyProjectName AppPool">
      <virtualDirectory path="/" physicalPath="E:\Projects\MyProjectName" />

   <application path="/docs" applicationPool="docs AppPool">
      <virtualDirectory path="/" physicalPath="E:\Projects\MyProjectName" />

      <binding protocol="http" bindingInformation="*:59386:localhost" />
      <binding protocol="https" bindingInformation="*:44345:localhost" />
    <!-- To enable logging, please change the below attribute "enabled" to "true" -->
    <logFile logFormat="W3C" directory="%AppData%\Microsoft\IISExpressLogs" enabled="false" />
    <traceFailedRequestsLogging directory="%AppData%\Microsoft" enabled="false" maxLogFileSizeKB="1024" />
  <applicationDefaults applicationPool="Clr4IntegratedAppPool" />
  <virtualDirectoryDefaults allowSubDirConfig="true" />

Where there are some strange setting defined by

<application path="/docs" applicationPool="docs AppPool">
   <virtualDirectory path="/" physicalPath="E:\Projects\MyProjectName" />

that has been certainly added when I've tried to set as start folder the /docs path.

Commenting out this setting and another one at the end of the file related to this path has solved the issue.

answered on Stack Overflow Oct 5, 2019 by Giox

It's currently a bug in VS2019

1.) Close your solution

2.) Delete applicationhost.config in folder .vs or delete the whole .vs folder

The .vs folder is next to your solution file usually.

enter image description here

3.) Restart your solution again

answered on Stack Overflow Nov 4, 2019 by Legends • edited Nov 7, 2019 by Legends

I got the same error when I did the following:

  1. Published two separate core websites
  2. In IIS, created two websites under "Default Web Site", each having physical path set to the two publish folders in (1).
  3. Now whichever of the sites I open first works, and the second gives that error.


Since both my sites are under "Default Web Site" they are both using DefaultAppPool, which is the cause of this error. The same error occurs when the sites are not under "Default Web Site" but use the same app pool.


As mentioned in the docs,

To fix this error, run apps in separate IIS application pools.

for me this problem was resolved when I started using separate app pools for each site.

answered on Stack Overflow Oct 25, 2019 by Sнаđошƒаӽ • edited Oct 26, 2019 by Sнаđошƒаӽ

User contributions licensed under CC BY-SA 3.0