Unable to debug ASP.NET 5 using IIS Express with Visual Studio 2015
<p>When I am trying to debug asp.net 5 application in Visual Studio 2015, I am getting following error
"An error occurred attempting to determine the process id of the DNX process hosting your application"
<a href="https://i.stack.imgur.com/2vBRs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2vBRs.png" alt="enter image description here"></a></p>

<p><strong>UPDATE 2</strong></p>

<blockquote>
  <p>It is only happening in Windows 10. I tested with Windows 7 and I did
  not run into this error.</p>
</blockquote>

<p>I am able to run using "web" option in Visual Studio 2015, but the error is happening with IIS Express. When I hit ctrl+F5 (run without debugging), the browser window opens and just sits there doing nothing (cursor spins forever).</p>

<p>snapshot of toolbar
<a href="https://i.stack.imgur.com/xJyYA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xJyYA.png" alt="enter image description here"></a></p>

<p><strong>The Output -> Debug window is empty, so not sure what is the root cause of this error. Not sure if there is anywhere else I have to look for more error details.</strong>
<a href="https://i.stack.imgur.com/eascA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eascA.png" alt="enter image description here"></a></p>

<p>I have </p>

<pre><code>Microsoft Visual Studio Professional 2015 Version 14.0.25123.00 Update 2 
Microsoft .NET Framework Version 4.6.01038
Windows 10 pro v1511 OS build 10586.218  
DNVM 1.0.0-rc1-15540
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16609
</code></pre>

<p>I even tried dnvm upgrade, which upgraded dnx to dnx-clr-win-x86.1.0.0-rc1-update2, but error is still occurring.</p>

<p>I tried most of solutions listed in </p>

<p><a href="https://stackoverflow.com/questions/33166403/an-error-occurred-attempting-to-determine-the-process-id-of-the-dnx-process-host">An error occurred attempting to determine the process id of the DNX process hosting your application</a> </p>

<p>and</p>

<p><a href="https://stackoverflow.com/questions/34197265/an-error-occurred-attempting-to-determine-the-process-id-of-the-dnx-process-host?rq=1">An error occurred attempting to determine the process id of the DNX process hosting your application on clean installed windows 10 + vs2015</a></p>

<p>and none of them worked. </p>

<p><strong>here is a simple test application if any one wants to look at it.</strong> <a href="https://github.com/vinodbadugu/aspnet5test" rel="nofollow noreferrer">https://github.com/vinodbadugu/aspnet5test</a></p>

<p>launchsettings.json (<strong>UPDATE 1</strong>)</p>

<pre><code>    {
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:44342/",
      "sslPort": 0
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "launchUrl": "http://localhost:44342/",
      "environmentVariables": {
        "Hosting:Environment": "Development"
      },
      "sdkVersion": "dnx-clr-win-x86.1.0.0-rc1-update2"
    },
    "web": {
      "commandName": "web",
      "environmentVariables": {
        "Hosting:Environment": "Development"
      }
    }
  }
}
</code></pre>

<p>project.json</p>

<pre><code>{
  "version": "1.0.0-*",
  "compilationOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
    "Microsoft.AspNet.Diagnostics":  "1.0.0-rc1-final"
  },

  "commands": {
    "web": "Microsoft.AspNet.Server.Kestrel"
  },

  "frameworks": {
    "dnx451": { },
    "dnxcore50": { }
  },

  "exclude": [
    "wwwroot",
    "node_modules"
  ],
  "publishExclude": [
    "**.user",
    "**.vspscc"
  ]
}
</code></pre>

<p>startup.cs</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.Http;
using Microsoft.Extensions.DependencyInjection;

namespace Tutorial1
{
    public class Startup
    {
        // This method gets called by the runtime. Use this method to add services to the container.
        // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
        public void ConfigureServices(IServiceCollection services)
        {
        }

        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app)
        {
            app.UseIISPlatformHandler();
            app.UseDeveloperExceptionPage();

            app.Run(async (context) =&gt;
            {
                await context.Response.WriteAsync("Hello World!");
            });
        }

        // Entry point for the application.
        public static void Main(string[] args) =&gt; WebApplication.Run&lt;Startup&gt;(args);
    }
}
</code></pre>

<p>dnvm list</p>

<pre><code>Active Version           Runtime Architecture OperatingSystem Alias
------ -------           ------- ------------ --------------- -----
       1.0.0-rc1-update1 clr     x64          win
       1.0.0-rc1-update1 clr     x86          win
       1.0.0-rc1-update1 coreclr x64          win
       1.0.0-rc1-update1 coreclr x86          win
  *    1.0.0-rc1-update2 clr     x86          win             default
       1.0.0-rc1-update2 coreclr x86          win
</code></pre>