0

We have web api application in which we have used SQL database on cloud. To connect to a azure cloud we are using company's VPN. When we are connect to VPN and try to debug the Web API locally it gives the following error.

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

But if we disconnect from VPN and try to debug Web API then we are able to do it.

Below is the url which we are using in local environment for debugging. https://localhost:44374/swagger/index.html

We have kept Enable SSL = True in settings for web .api project. And also tried with Creating and installing self signed certificate, but not able to create the certificate itself. We are using .net core framework.

So, how can we solve this issue ?

Any help on this appreciated.

Camilo Terevinto
  • 31,141
  • 6
  • 88
  • 120
XamDev
  • 3,377
  • 12
  • 58
  • 97
  • _"One or more errors occurred"_ - any detail on what those are? – stuartd Sep 03 '18 at 12:23
  • @stuartd Nope. This is what I can see in the error message popup. – XamDev Sep 03 '18 at 12:30
  • Add some logging then. – stuartd Sep 03 '18 at 15:15
  • @stuartd I am getting this error even before API is getting started. The link which I provided in question is not getting loaded. I am getting server is getting time to response error then after that the error which is provided in question. So , in this case how can I add the logging? – XamDev Sep 04 '18 at 05:12
  • fair point, sorry. – stuartd Sep 04 '18 at 09:30
  • @stuartd Any help on this ? – XamDev Sep 04 '18 at 09:34
  • 1
    [The link](https://stackoverflow.com/questions/40965442/an-error-occurred-attempting-to-determine-the-process-id-of-dotnet-exe-which-is) posted in the answer below looks helpful, have you looked through that and the links in it? – stuartd Sep 04 '18 at 09:37

2 Answers2

1

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.

3.You are debugging your app (which is preventing SSL certificate setup).

To fix this, run the app without debugging via Ctrl + F5. That might install the SSL certificate for you. If it does not, consider changing your app's launch settings from Https to Http.

Also, if the application did not start in Internet Explorer, open an IE window and copy/paste the start URL into that window.
1.IE will display a certificate warning. Click Continue to this website. 2.Click on the red certificate error symbol in the address bar and then View certificates. 3.In the dialog that opens click Install certificate.
4.In the certification installation dialog choose "Local machine", (not "Current user"), then click "Next".
5.Select "Place all certificates into the following store" and in the "Browse..." dialog, select "Trusted Root Certification Authorities".
6.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.

For more details, you could refer to this SO thread.

Joey Cai
  • 18,968
  • 1
  • 20
  • 30
0

This may be due to an outage that we are experiencing in the South Central US.

https://azure.microsoft.com/en-us/status/

enter image description here

You will want to monitor the Azure Status Page for further updates. Unfortunately we cannot do anything until the problem has been mitigated by engineering.

Marilee Turscak - MSFT
  • 7,367
  • 3
  • 18
  • 28
  • This is starting from 4th sept. But we are facing this issue from last week. Means when have started to develop api project. I think issue is something different. – XamDev Sep 04 '18 at 18:11