Search code examples
c#asp.net-corekestrel-http-server

ASP.Net Kestrel not loading up console from Visual Studio, how can I debug the issue?


I'm trying to debug why my ASP.Net RC-1 project isn't running on Kestrel. When I hit 'web' as the startup option, the output window seems clean - there's no exceptions. But the console that I'm told will pop up - doesn't. How can I debug what is causing this issue?

I created another template project and ran that just to make sure that ran ok from Kestrel and it did.

These are the last lines of the output, for my project:

'dnx.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Users\David\.dnx\packages\Microsoft.AspNet.Authentication.Cookies\1.0.0-rc1-final\lib\net451\Microsoft.AspNet.Authentication.Cookies.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Microsoft.Extensions.DependencyInjection.DataProtectionServices: Information: User profile is available. Using 'C:\Users\David\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
'dnx.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0xf80 has exited with code 0 (0x0).
The thread 0x7ec has exited with code 0 (0x0).
The thread 0x3f38 has exited with code 0 (0x0).
The thread 0x10d4 has exited with code 0 (0x0).

EDIT:

I should add, it runs just fine on IIS.

Many Thanks!


Solution

  • How can I debug what is causing this issue?

    We can troubleshoot the issue; unfortunately, we cannot debug it. Here is a first troubleshooting step.

    Open a command prompt. Then cd to the directory that contains the project.json file. Then run the following commands. This will give you some more information.

    C:\MyProject>  dnu restore
    C:\MyProject>  dnu build
    C:\MyProject>  dnx web
    

    The above restores NuGet packages, builds the project, and runs the web command. If it works from the command line, then something is going wrong specifically in Visual Studio.