An error occurred attempting to determine the process id of dotnet.exe which is hosting your application. One or more error occured

An error occurred attempting to determine the process id of dotnet.exe which is hosting your application. One or more errors occurred.

That problem can occur when three things are true:

  1. your app is trying to run with SSL,
  2. your app does not have an SSL Certificate setup, and
  3. you are debugging your app (which is preventing SSL certificate setup).

As a quick fix attempt, run the app without debugging via Ctrl + F5 or view the app in the browser via Ctrl + Shift + W. That might install the SSL certificate for you. If it does not, consider changing your app's launch settings from HTTPS to HTTP. If you really need SSL, you'll have to figure out how to install and use an SSL certificate on your local machine.

Checkout out these on GitHub and StackOverflow.

  • https://github.com/aspnet/Home/issues/1608
  • https://github.com/aspnet/Home/issues/1723
  • https://github.com/Azure-Samples/active-directory-dotnet-webapp-openidconnect-aspnetcore/issues/17
  • An error occurred attempting to determine the process id of the DNX process hosting your application on clean installed windows 10 + vs2015

Note that for IIS Express to work with SSL, the port needs to be in the 44300 through 44399 range (from How do I restore a missing IIS Express SSL Certificate? -original article https://docs.microsoft.com/en-us/iis/extensions/using-iis-express/running-iis-express-without-administrative-privileges)

For other ports Visual Studio 2017 didn't install the SSL Certificate, but I was able to install it as suggested in How do I restore a missing IIS Express SSL Certificate?

From an elevated command prompt run (specify your port number):

    cd "C:\Program Files (x86)\IIS Express"
    IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:55555/ -UseSelfSigned

Edit:

Then browse to the website https://localhost:44348/ (using FF) and if you're prompted add the security exception.


This may happen when you try to run your application with the "Enable SSL" setting enabled, and if the self-signed certificate has not been installed as a trusted root certificate.

To fix, follow these steps:

  1. Press CTRLF5 to start your application and have VS create the self-signed certificate.
  2. If the application did not start in Internet Explorer, open an IE window and copy/paste the start URL into that window.
  3. IE will display a certificate warning. Click "Continue to this website."
  4. Click on the red certificate error symbol in the address bar and then "View certificates".
  5. In the dialog that opens click "Install certificate...".
  6. In the certification installation dialog choose "Local machine", (not "Current user"), then click "Next".
  7. Select "Place all certificates into the following store" and in the "Browse..." dialog, select "Trusted Root Certification Authorities".
  8. Complete the installation dialog, then close and reopen the browser tab. Now no certificate error should be displayed.

You are all set now to run your project with F5 in debug mode.