ASP.NET 5 个网络应用未 运行 在 IIS Express 中处于调试模式

ASP.NET 5 web app not running in debug mode in IIS Express

完全按照此 Tutorial 包括此处描述的先决条件,我在 Windows 7 上使用 VS2015 Professional 创建了 Web 应用程序 ContosoBooks。该应用程序编译成功,但是当我 运行 在 Visual Studio 中使用 F5 在调试模式下应用程序时,它等待了很长时间,最后给我这个错误: 项目属性设置为默认值如下:

windows 事件日志显示以下消息:The directory specified for caching compressed content C:\Users\myname\AppData\Local\Temp\iisexpress\IIS Temporary Compressed Files\Clr4IntegratedAppPool is invalid. Static compression is being disabled

project.json文件如下:

{
  "userSecretsId": "aspnet5-ContosoBooks-1954a805-4685-4556-982f-138333528f36",
  "version": "1.0.0-*",
  "compilationOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "EntityFramework.Commands": "7.0.0-rc1-final",
    "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
    "Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
    "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc1-final",
    "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-final",
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
    "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
    "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
    "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
    "Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final",
    "Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final",
    "Microsoft.Extensions.Configuration.FileProviderExtensions" : "1.0.0-rc1-final",
    "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
    "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
    "Microsoft.Extensions.Logging": "1.0.0-rc1-final",
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
    "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final"
  },

  "commands": {
    "web": "Microsoft.AspNet.Server.Kestrel",
    "ef": "EntityFramework.Commands"
  },

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

  "exclude": [
    "wwwroot",
    "node_modules"
  ],
  "publishExclude": [
    "**.user",
    "**.vspscc"
  ],
  "scripts": {
    "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
  }
}

我遇到了完全相同的问题,我找到了一个原因:Bitdefender AV。完全卸载 Bitdefender(从他们的站点下载卸载程序)解决了我的问题。为什么 Bitdefender 会干扰 运行 一个 ASP.NET 5 应用程序,我无法理解。我已经在 Bitdefender 注册了支持票,但还没有收到任何回复。

在 startup.cs 中注释掉 app.UseBrowserLink() 允许我使用 Bitdefender Endpoint Security 和 ASP.Net 5.

我在 asp.net github 页面上找到了这个解决方法。

https://github.com/aspnet/Tooling/issues/309

Bitdefender 和 Visual Studio 2015 的问题可以通过简单地卸载和安装 Bitdefender 来解决。可能该问题已从软件的新发行版中移除。