简体   繁体   English

从Beta5升级的ASP.NET MVC 6 Beta8项目使IIS Express崩溃-主函数意外返回状态代码0?

[英]ASP.NET MVC 6 Beta8 Project Upgraded from Beta5 crashes IIS Express - The main function returned unexpectedly with status code 0?

I have a very simple mvc project that was beta5 and upgraded to beta8. 我有一个非常简单的mvc项目,该项目是beta5,并已升级到beta8。 During that upgrade, I changed the reference for IIS from Microsoft.AspNet.Server.IIS to Microsoft.AspNet.Server.IISPlatformHandler as well as changing the reference for kestrel (which isn't important, because the kestrel server works fine). 在该升级过程中,我将IIS的引用从Microsoft.AspNet.Server.IIS更改为Microsoft.AspNet.Server.IISPlatformHandler,还更改了对Kestrel的引用(这并不重要,因为Kestrel服务器可以正常工作)。 Whenever I try to run the project with IIS Express, it immediately crashes and return the error 每当我尝试使用IIS Express运行项目时,它立即崩溃并返回错误

"The main function returned unexpectedly with status code 0." “主函数意外返回了状态代码0。”

When the page is reloaded, the error changes to 重新加载页面后,错误变为

"The main function returned unexpectedly with status code -2147023829." “主函数意外返回了状态代码-2147023829。”

I can't find any documentation on these status codes and there seems to be only three issues related to it. 我找不到有关这些状态代码的任何文档,似乎只有三个与之相关的问题。 They're all marked as issues on the Asp.Net github page, and two of them don't relate to this issue. 它们在Asp.Net github页面上都标记为问题,其中两个与该问题无关。 The other one says that this problem can be called by versioning issues in the publish profiles, so I checked them and they're all updated. 另一个人说,可以通过发布配置文件中的版本控制问题来解决此问题,因此我检查了它们,并全部进行了更新。

That one is located here: https://github.com/aspnet/Home/issues/735 那个位于这里: https : //github.com/aspnet/Home/issues/735

And the other two can be found here: 另外两个可以在这里找到:

Here's my project.json: 这是我的project.json:

{
  "webroot": "wwwroot",
  "version": "1.0.0-beta8",

  "dependencies": {
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-beta8",
    "Microsoft.AspNet.Mvc": "6.0.0-beta8",
    "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta8",
    "Microsoft.AspNet.StaticFiles": "1.0.0-beta8",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8",
    "System.Net.Sockets": "4.0.10-beta-23409"
  },

  "commands": {
    "web": "Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5001"
  },


  "frameworks": {
    "dnxcore50": {}
  },

  "publishExclude": [
    "node_modules",
    "bower_components",
    "**.xproj",
    "**.user",
    "**.vspscc"
  ],
  "exclude": [
    "wwwroot",
    "node_modules",
    "bower_components"
  ]
}

The of the project can be found at https://github.com/ThePlatinumTaco/TSA_2016/tree/master/src/TSA%202016 but if there are any resources there that are helpful, say so in the comments so they can be added here to help anybody else with this issue. 该项目的可以在https://github.com/ThePlatinumTaco/TSA_2016/tree/master/src/TSA%202016中找到,但是如果有任何有用的资源,请在注释中注明,以便可以添加它们在这里可以帮助其他人解决这个问题。

I believe you need a web.config in your wwwroot folder. 我相信您在wwwroot文件夹中需要一个web.config。 They added it from beta-8 I just upgraded my vNext project to the RC1. 他们从beta-8中添加了它,我刚刚将vNext项目升级到了RC1。 https://raw.githubusercontent.com/mgolois/DivineChMS/master/src/DivineChMS.Web/wwwroot/web.config https://raw.githubusercontent.com/mgolois/DivineChMS/master/src/DivineChMS.Web/wwwroot/web.config

Read this as well: http://damienbod.com/2015/10/16/asp-net-5-updating-to-beta8-from-older-beta-versions/ 还要阅读此内容: http : //damienbod.com/2015/10/16/asp-net-5-updating-to-beta8-from-older-beta-versions/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM