ASP.NET 5 Web应用程序未在IIS Express中以调试模式运行

时间:2015-12-02 02:00:50

标签: iis visual-studio-2015 asp.net-core iis-express .net-4.6

完全遵循此Tutorial,包括其中描述的先决条件,我使用VS2015上的Windows 7专业人员创建了网络应用ContosoBooks。该应用程序编译成功,但当我在Visual Studio中使用F5在调试模式下运行应用程序时,它等待了很长时间,最后给了我这个错误: enter image description here 项目属性设置为默认值,如下所示: enter image description here enter image description here

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" ]
  }
}

3 个答案:

答案 0 :(得分:2)

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

答案 1 :(得分:2)

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

我在asp.net github页面上找到了这个工作。

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

答案 2 :(得分:0)

只需卸载和安装Bitdefender即可解决Bitdefender和Visual Studio 2015的问题。可能该问题已从该软件的新发行版中删除。