Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/277.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# ASP.Net Kestrel没有从Visual Studio加载控制台,如何调试该问题?_C#_Asp.net Core_Kestrel Http Server - Fatal编程技术网

C# ASP.Net Kestrel没有从Visual Studio加载控制台,如何调试该问题?

C# ASP.Net Kestrel没有从Visual Studio加载控制台,如何调试该问题?,c#,asp.net-core,kestrel-http-server,C#,Asp.net Core,Kestrel Http Server,我正在调试为什么我的ASP.NETRC-1项目没有在Kestrel上运行。当我点击“web”作为启动选项时,输出窗口看起来很干净——没有例外。但我被告知的控制台会弹出——不会。如何调试导致此问题的原因 我创建了另一个模板项目,并运行了该项目,以确保Kestrel运行正常,它确实运行了 以下是我的项目输出的最后几行: 'dnx.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Users\David\.dnx\packages\Microsoft.A

我正在调试为什么我的ASP.NETRC-1项目没有在Kestrel上运行。当我点击“web”作为启动选项时,输出窗口看起来很干净——没有例外。但我被告知的控制台会弹出——不会。如何调试导致此问题的原因

我创建了另一个模板项目,并运行了该项目,以确保Kestrel运行正常,它确实运行了

以下是我的项目输出的最后几行:

'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).
编辑:

我应该补充一点,它在IIS上运行得很好

非常感谢

如何调试导致此问题的原因

我们可以解决这个问题;不幸的是,我们无法调试它。这里是故障排除的第一步

打开命令提示符。然后
cd
到包含project.json文件的目录。然后运行以下命令。这将为您提供更多信息

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

上述操作将恢复NuGet包、构建项目并运行
web
命令。如果它是从命令行运行的,那么在Visual Studio中就出现了一些问题。

这可能是我收到的关于堆栈溢出的最优秀的书面回复,它是完美的,而且信息非常丰富-非常真诚,谢谢。事实证明,我的Web构建没有设置为调试,因此我的用户机密没有填充到配置生成器中,从而导致了问题。我现在已经解决了这个问题。我应该补充一点,命令行中的DNXWeb就是我发现异常的地方。由于某些原因,这在VisualStudio内部是不可见的。