无法在IIS Express中启动asp.net核心Web应用程序 [英] Cannot launch asp.net core web app in IIS Express

查看:163
本文介绍了无法在IIS Express中启动asp.net核心Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是BitDefender防病毒软件. 我按照有关如何安装asp.net 5 beta 8的说明进行操作.我能够毫无问题地安装所有必需的文件.但是,每次我选择Web模板并尝试使用IIS Express运行它时,它都会加载几分钟,然后显示错误:HTTP错误502.3-错误的网关... 我尝试了此指南中的所有故障排除步骤,但未成功.我检查了事件日志,并注意到以下两个条目:

The problem is BitDefender anti virus. I followed the instructions on how to install asp.net 5 beta 8. I was able to install all the necessary files without any problem. However every time I selected the web template and attempted to run it using IIS Express it would load for a couple of minutes before displaying an error: HTTP Error 502.3 - Bad Gateway... I tried all the troubleshooting steps in this guide but was unsuccessful. I checked my event log and noticed the following two entries:

为缓存压缩内容C:\ Users ... Files \ Clr4IntegratedAppPool而指定的目录无效.静态压缩被禁用.

The directory specified for caching compressed content C:\Users...Files\Clr4IntegratedAppPool is invalid. Static compression is being disabled.

,还有:

找不到源HttpPlatformHandler的事件ID 1001的描述.引发此事件的组件未安装在本地计算机上,或者安装已损坏.您可以在本地计算机上安装或修复该组件.

The description for Event ID 1001 from source HttpPlatformHandler cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

如果事件起源于另一台计算机,则显示信息必须与事件一起保存.

If the event originated on another computer, the display information had to be saved with the event.

该事件包含以下信息:

进程'4528'成功启动,并且正在侦听端口'x'.

Process '4528' started successfully and is listening on port 'x'.

我不确定这些警告/信息是否与我的问题有关.如果有人能对此有所启示,那将是一件好事.我所知道的是我已经安装了HttpPlatformHandler.

I am not entirely sure if these warnings / information are related to my issue. If anyone can shed some light on this that would be good. All I know is that I have installed the HttpPlatformHandler.

我决定尝试使用另一个Visual Studio模板(空白模板),但奇怪的是它可以正常工作.然后,我创建了一个新的Web应用程序并使用了项目属性,并注意到当我选中复选框:"Use Specific Runtime"并选择x64体系结构时,一切正常! :)但是,如果未选中该复选框(默认设置),或者选中了该复选框并且将体系结构设置为x86时,我会收到相同的旧错误.

I decided to try another visual studio template (blank template) and strangely enough it worked. I then created a new web application and played around with the project properties and noticed that when I tick the checkbox: "Use Specific Runtime" and select an x64 architecture everything works!! :) however when the checkbox is not ticked (the default) or when the checkbox is selected and the architecture is set to x86 I get the same old error.

如何使其使用默认设置运行?还是我在这里想念东西?

How do I get it to run using the default settings? or am I missing something here?

这是我的project.json文件

Here is my project.json file

{
  "webroot": "wwwroot",
  "userSecretsId": "aspnet5-WebApplication3-1a336a00-1f3e-432d-928e-f2669c4b0d94",
  "version": "1.0.0-*",

  "dependencies": {
    "EntityFramework.Commands": "7.0.0-beta8",
    "EntityFramework.SqlServer": "7.0.0-beta8",
    "Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta8",
    "Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta8",
    "Microsoft.AspNet.Authentication.Google": "1.0.0-beta8",
    "Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta8",
    "Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta8",
    "Microsoft.AspNet.Diagnostics": "1.0.0-beta8",
    "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta8",
    "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta8",
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-beta8",
    "Microsoft.AspNet.Mvc": "6.0.0-beta8",
    "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta8",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8",
    "Microsoft.AspNet.StaticFiles": "1.0.0-beta8",
    "Microsoft.AspNet.Tooling.Razor": "1.0.0-beta8",
    "Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta8",
    "Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
    "Microsoft.Framework.Configuration.UserSecrets": "1.0.0-beta8",
    "Microsoft.Framework.Logging": "1.0.0-beta8",
    "Microsoft.Framework.Logging.Console": "1.0.0-beta8",
    "Microsoft.Framework.Logging.Debug" : "1.0.0-beta8",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta8"
  },

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

这是我一直以来一直没有尝试的尝试:

This is what I've tried since with no success:

  1. 在安全模式下启动了Visual Studio.
  2. 清除了Visual Studio缓存.
  3. 修复了Visual Studio2015.
  4. 先卸载然后再重新安装Visual Studio2015.
  5. 完全格式化我的PC并重新安装.

其他一些信息:

  • 我正在运行Windows Enterprise10.
  • 我正在运行Visual Studio 2015 Enterprise.
  • 它曾经工作过一两次,但我无法确定任何 关于何时的模式.
  • 我只是想获得一个Visual Studio ASP.net 开箱即用的5个MVC模板即可运行.
  • 我尝试了不同的BETA版本以及RC版本.
  • I am running Windows Enterprise 10.
  • I am running Visual Studio 2015 Enterprise.
  • It has worked once or twice but I am unable to identify any pattern as to when.
  • I am just trying to get a visual studio ASP.net 5 MVC out of the box template to run.
  • I've tried different BETA releases and also the RC release.

推荐答案

所以我终于找到了问题的原因.

So I've finally found the cause of the problem.

我在计算机上安装了BitDefender防病毒软件,由于某种奇怪的原因,它会导致这种行为.如原始帖子中所述,我确实尝试禁用它,但这没有用.我必须完全卸载该软件:(

I have BitDefender anti virus installed on the computer which for some strange reason it is causing this behavior. As mentioned in the original post I did try disabling it but that didn't work. I had to completely uninstall the software :(

浪费时间:(

这篇关于无法在IIS Express中启动asp.net核心Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆