我在VS2015中创建了一个新的“ASP.NET核心Web应用程序(.NET Core)”项目.它建立没有任何问题,所以我想给它一个测试运行.但是,当启动时,它会阻塞并崩溃,并显示以下错误:
Exception thrown: 'System.AggregateException' in Microsoft.AspNetCore.Server.Kestrel.dll The program '[11608] dotnet.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'. The program '[15048] iisexpress.exe' has exited with code 0 (0x0).
我没有看到任何其他记录.我尝试调试它,我发现所有的是在程序类中的WebHostBuilder.Run()方法中破坏了它.它是框架的一部分,所以我不能进一步.
请注意,通过dotnet run命令运行时程序运行正常.只有IISExpress不工作.
我该怎么去调试这个问题?
project.json文件在下面. (它是由Visual Studio生成的,我没有改变任何东西.)
{ "dependencies": { "Microsoft.NETCore.App": { "version": "1.0.0-rc2-3002702","type": "platform" },"Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-final","Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final","Microsoft.AspNetCore.Razor.Tools": { "version": "1.0.0-preview1-final","type": "build" },"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final","Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final","Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final","Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final","Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final","Microsoft.Extensions.Logging": "1.0.0-rc2-final","Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final","Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final","Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc2-final" },"tools": { "Microsoft.AspNetCore.Razor.Tools": { "version": "1.0.0-preview1-final","imports": "portable-net45+win8+dnxcore50" },"Microsoft.AspNetCore.Server.IISIntegration.Tools": { "version": "1.0.0-preview1-final","imports": "portable-net45+win8+dnxcore50" } },"frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6","dnxcore50","portable-net45+win8" ] } },"buildOptions": { "emitEntryPoint": true,"preserveCompilationContext": true },"runtimeOptions": { "gcServer": true },"publishOptions": { "include": [ "wwwroot","Views","appsettings.json","web.config" ] },"scripts": { "prepublish": [ "npm install","bower install","gulp clean","gulp min" ],"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] } }
更新:我为Core RTM发布了一个新项目,这一次它工作.