0

I know there is a million question on this subject, but non of the solutions helped me yet.

I was implementing IdentityServer in my solution and everytime when I try to run it i get this error:

enter image description here

It is occurring as soon as I press to debug on IISExpress. I have read somewhere that the problem is related to .NET Core and that helpful thing is if you turn off VS2015, remove package.lock.json, but that solution didn't helped me.

Is there some way to see more details for this problem? This error is not suggestive at all, some log file or something?

All of my references looks ok:

enter image description here

This is my package.json:

{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.0",
      "type": "platform"
    },
        "Microsoft.AspNetCore.Diagnostics": "1.1.0",
        "Microsoft.ApplicationInsights.AspNetCore": "1.0.0",
        "Microsoft.AspNetCore.Mvc": "1.1.0",
        "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
        "Microsoft.AspNetCore.Routing": "1.1.0",
        "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
        "Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
        "Microsoft.AspNetCore.StaticFiles": "1.1.0",
        "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
        "Microsoft.Extensions.Configuration.Json": "1.1.0",
        "Microsoft.Extensions.Logging": "1.1.0",
        "Microsoft.Extensions.Logging.Console": "1.1.0",
        "Microsoft.Extensions.Logging.Debug": "1.1.0",
        "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
        "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.*",
        "IdentityServer4": "1.0.0-rc5"
  },

  "tools": {
    "BundlerMinifier.Core": "2.0.238",
    "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "web.config"
    ]
  },

  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }
}

Maybe I am missing some reference that is necessary for use of IISExpress? I simply have no idea what can be the possible problem. Has anyone experienced something similar?

nemo_87
  • 4,523
  • 16
  • 56
  • 102
  • Have you got any solution for this one? As I am also facing the same issue. – Mrunal Jan 27 '17 at 06:54
  • 2
    Possible duplicate of [An error occurred attempting to determine the process id of dotnet.exe which is hosting your application. One or more error occured](http://stackoverflow.com/questions/40965442/an-error-occurred-attempting-to-determine-the-process-id-of-dotnet-exe-which-is) – Doug Apr 27 '17 at 21:41

2 Answers2

2

I don't know if you are using SSL for your project. If you are, then the link given by Doug would solve the problem. If you are not, then follow these steps to fix the issue:

  1. Open project properties
  2. Open Debug Menu
  3. Uncheck Enable SSL and Rewrite the App Url (http://localhost:5000 or whatever port you are using. Make sure there is no 's' in 'http'!)
  4. Ctrl+S (save the file)
  5. Close all instances of Chrome or IE
  6. Reopen your project in VS.
  7. Now, run your project. (Click IIS Express)
  8. Thats all.

Hope it works for you.

Keshan Nageswaran
  • 8,060
  • 3
  • 28
  • 45
heyAkhilesh
  • 639
  • 6
  • 7
0

I needed https so this worked for me:

  1. Go into Add/Remove programs and fix IISExpress, this reinstalls an IIS Certificate
  2. Open project properties
  3. Open Debug Menu Uncheck Enable SSL and Rewrite the App Url (http://localhost:5000 or whatever port you are using. Make sure there is no 's' in 'http'!)
  4. Ctrl+S (save the file)
  5. Launch the application
  6. Stop the application
  7. Open project properties and enable ssl again
  8. Ctrl+S (save the file)
  9. Edit launchSettings.json under Properties folder, make sure all ports are set correctly and that all urls have https
  10. Save launchSettings.json and launch you website again
Doff3n
  • 614
  • 3
  • 9
  • 23