An error occurred while trying to determine the process ID of dotnet.exe where your application is located. One or more errors occurred

I cloned the project from the source URL. My friend developed the main asp.net web application using .NetCore 1.0.0-preview2-003121 sdk. However, on my computer I installed .NetCore 1.0.1-preview2-003131 sdk. I get an error message . I changed the version in the global.json file, as you can see below, but still there is no solution. I am google, but the whole solution does not work for me.

Global.json File

{ "projects": [ "src", "test" ], "sdk": { "version": "1.0.0-preview2-003131" } } 

Project.json

 { "userSecretsId": "aspnet-FMM-02f339eb-4af7-42c9-b7f3-d05b48d36811", "dependencies": { "Microsoft.NETCore.App": { "version": "1.0.0", "type": "platform" }, "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0", "Microsoft.AspNetCore.Diagnostics": "1.0.0", "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0", "Microsoft.AspNetCore.Mvc": "1.0.0", "Microsoft.AspNetCore.Razor.Tools": { "version": "1.0.0-preview2-final", "type": "build" }, "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", "Microsoft.AspNetCore.Server.Kestrel": "1.0.0", "Microsoft.AspNetCore.StaticFiles": "1.0.0", "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", "Microsoft.Extensions.Configuration.Json": "1.0.0", "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0", "Microsoft.Extensions.Logging": "1.0.0", "Microsoft.Extensions.Logging.Console": "1.0.0", "Microsoft.Extensions.Logging.Debug": "1.0.0", "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0", "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0", "Microsoft.VisualStudio.Web.CodeGeneration.Tools": { "version": "1.0.0-preview2-final", "type": "build" }, "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": { "version": "1.0.0-preview2-final", "type": "build" }, "Microsoft.EntityFrameworkCore.Tools": { "version": "1.0.0-preview2-final", "type": "build" }, "Microsoft.EntityFrameworkCore": "1.0.0", "Microsoft.AspNetCore.Identity": "1.0.0", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0", "Microsoft.EntityFrameworkCore.Relational": "1.0.0", "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0", "Microsoft.EntityFrameworkCore.Design": "1.0.0-preview2-final", "Microsoft.AspNetCore.Authentication.Facebook": "1.0.0", "Microsoft.AspNetCore.Authentication.Google": "1.0.0", "MailKit": "1.8.1", "NLog.Extensions.Logging": "1.0.0-*", "System.Data.SqlClient": "4.1.0" }, "tools": { "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final", "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final", "Microsoft.Extensions.SecretManager.Tools": "1.0.0-preview2-final", "Microsoft.VisualStudio.Web.CodeGeneration.Tools": { "version": "1.0.0-preview2-final", "imports": [ "portable-net45+win8" ] } }, "frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "portable-net45+win8" ] } }, "buildOptions": { "emitEntryPoint": true, "preserveCompilationContext": true, "xmlDoc": false }, "runtimeOptions": { "configProperties": { "System.GC.Server": true } }, "publishOptions": { "include": [ "wwwroot", "Views", "Areas/**/Views", "appsettings.json", "web.config", "nlog.config" ] }, "scripts": { "prepublish": [ "bower install" ], "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] } } 

Point version on my computer

How can I solve this problem. Please let me know about this. [ enter image description here

[ enter image description here

+60
source share
17 answers

An error occurred while trying to determine the process ID of dotnet.exe where your application is located. One or more errors have occurred.

This problem can occur when three things are true:

  • your application is trying to work with SSL,
  • your application does not have an SSL certificate installed and
  • You are debugging your application (which prevents the installation of an SSL certificate).

How to quickly fix the attempt , start the application without debugging via Ctrl + F5 or view the application in the browser using Ctrl + Shift + W. This may install an SSL certificate for you. If this is not the case, consider changing the application launch settings from HTTPS to HTTP. If you really need SSL, you need to figure out how to install and use an SSL certificate on your local machine.

Checkout them on GitHub and StackOverflow.

+97
source

Please note that for IIS Express to work with SSL, the port must be in the range from 44300 to 44399 (from How to recover 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 did not install an SSL certificate, but I was able to install it as indicated in How to recover a missing IIS Express SSL certificate?

Run the elevated command prompt (specify the port number):

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

Edit:

Then go to https: // localhost: 44348 / (using FF) and add a security exception when prompted.

+46
source

This can happen when you try to start the application with the Enable SSL option enabled and if the self-signed certificate was not installed as a trusted root certificate.

To fix, follow these steps:

  • Press CTRL F5 to launch the application and create the VS certificate yourself.
  • If the application does not start in Internet Explorer, open an IE window and copy / paste the start URL into this window.
  • IE will display a certificate warning. Click Continue on this website.
  • Click the red certificate error symbol in the address bar, and then click View Certificates.
  • In the dialog box that opens, click "Install Certificate ...".
  • In the Certification Setup dialog box, select Local Computer (not Current User), then click Next.
  • Select "Place all certificates in the following store" and in the "Browse ..." dialog box, select "Trusted Root Certification Authorities."
  • Complete the installation dialog, then close and close the browser tab again. Now the certificate error should not be displayed.

Now you are ready to run the F5 project in debug mode.

+34
source

I had the same problem, eventually realizing that I had configured the HTTPS rewrite URL in my web.config application for use in the production process. However, I did not want to mess with SSL in my dev environment, so I decided to delete it.

After deleting the section and trying to debug the application again, I noticed that Chrome continued to redirect my localhost to HTTPS, despite the fact that I did not select "Enable SSL" in the application properties.

What finally caused my application to be debugged locally in HTTP was clearing the Chrome cache.

Hope this helps someone else who's stuck!

+9
source

Remember to always specify the new IIS website in the hosts file in the System32 folder if you are using Windows. It was my case, the feeling of reset!

+2
source

I have a .NET Core application and I accidentally changed IIS launchSettings.json settings to use https instead of http. Reverting this change automatically fixed my problem.

+1
source

In my case, the problem arose because of the redirection rule in web.config (http → https). Try disabling the redirection rule and see if it works.

+1
source

If you use IIS (not Express), a simple Stop and Start from it did the job.

0
source

I solved this by following these steps:

  • Copy appsettings.Development.json from the Solution folder to the \ bin \ Debug \ netcoreapp2.0 folder
  • Rename it to appsettings.json

Worked like a charm for me.

0
source

I fixed this by doing:

CMD:

netsh http add iplisten ipaddress = 192.168.xxx.xxx

then control + c to exist, then iisreset

0
source

I ran into the same problem, and what I did to fix it was in my launchSettings.json I added this line of code and do not change http to https, otherwise you will get the same error

"iisSettings": {"windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": {"applicationUrl": " http: // localhost: add your localhost ID", "sslPort": 44342}

0
source

Make sure your IP address has not changed (if using the DNS name)

Whether you use "real DNS" or an override in hosts make sure your local IP has not changed.

If you use NAT and you do not have a fixed local IP address assigned to your machine, this is very easy to do. In fact, it may take months before you get a new IP, which will confuse you even more!

I had a record

192.168.1.134 dev.example.com

in my hosts file, but my local IP address has changed to 192.168.1.136 .

You can probably use 127.0.0.1 instead.

After fixing this for my case, I had to restart Visual Studio as well as the full IIS (I don't know why).

PS. In fact, I installed 192.168.1.134 in my "real DNS" to facilitate testing on mobile devices with the correct DNS name and certificate. Therefore, when this changes, it breaks.

0
source

Make sure you do not have proxy enabled for your local network

The other answers are great, but I got this error after rebooting after a crash. When Windows crashed, Fiddler worked on it, which registered as a proxy server on the local network. Fiddler cannot cancel its registration due to a failure, as well as due to the loading of Windows and browsers, etc., but setting up a LAN proxy prevents access to IIS Express (it may also interfere with IIS)

Therefore, make sure that the local proxy is not configured in the Internet settings.

0
source

I was not able to get IIS Express to work over HTTPS, but I was able to get it to work using the 'webApp' profile (run as a project). From the command line I had to run:

 dotnet dev-certs https --trust 

--trust is optional but prevents browser warnings for an untrusted certificate.

0
source

adding to the .csproj file in the PropertyGroup solved this problem for me

 <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> 
0
source

I had the same problem, tried almost all the solutions mentioned here, but then eventually found that I have an error in the list of errors after solving the problem, I was able to start my project.

0
source

I came across the same error. In my case, I overlooked the fact that there were URL rewriting rules in my web.config (doh) file. Commenting out the rewrite rule fixed the problem.

 <system.webServer> <rewrite> <rules> <rule name="Redirect to Https" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="^OFF$" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" /> </rule> </rules> </rewrite> </system.webServer> 
0
source

Source: https://habr.com/ru/post/1237831/


All Articles