Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have clone the project from source url. My friend has developed the asp.net core web application using .NetCore 1.0.0-preview2-003121 sdk. However on my pc I have install .NetCore 1.0.1-preview2-003131 sdk. I am getting the error. I changed the version in the global.json file as you can see below but still no solution.I google it but all the solution are not working 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%" ]   } } 

Dot net version in my pc

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

[enter image description here

like image 717
San Jaisy Avatar asked Dec 05 '16 00:12

San Jaisy


2 Answers

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
like image 76
Shaun Luttin Avatar answered Sep 17 '22 16:09

Shaun Luttin


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.

like image 36
Michael Freidgeim Avatar answered Sep 18 '22 16:09

Michael Freidgeim