【问题标题】:Unable to launch the IIS Web Server, how to debug无法启动 IIS Web 服务器,如何调试
【发布时间】:2016-06-23 12:29:59
【问题描述】:

我在 Visual Studio Pro 2015 中的 IIS Express 遇到问题。当我尝试启动网站时,出现单行错误

该项目是我编写的,但在我的 HDD 报废后从 TFS 重新加载。如果我创建一个新项目,也会出现同样的错误。

我正在使用存储在project\.vs\config 中的applicationhost.config 文件

我尝试了以下方法:

  • 删除%project%\.vs\configC:\Users\Paul\Documents\IISExpress\,让VS重建它
  • 暂时手动更改applicationhost.config 中的绑定以包含*https
  • 更改了Preferences -> Web -> Project Url中的端口号
  • TCPView 中寻找冲突的端口(尝试从 VS 运行并没有出现在此处,因为它没有达到那么远)
  • Turn Windows features on or off 中切换.Net
  • 卸载 IIS 并重新安装
  • 卸载VS并重新安装
  • 清理和重建解决方案
  • 多次重启

如果我运行 C:\Program Files (x86)\IIS Express\iisexpress.exe /config:%project%\.vs\config\applicationhost.config /site:Name /siteid:2 /systray:true /trace:error 没有错误,并且 IIS 按预期启动。

**这次安装和上次安装的唯一明显区别是我现在在 C: 盘上有 IISExpress,在 D: 盘上有 VS **

我在这台电脑上只安装了以下软件: 视觉工作室专业版 2015, Xamarin 工作室 6, Android Studio 和 SQL Server 速成版 2014。 操作系统为 Windows 10 专业版。

我知道这个错误很笼统,谁能告诉我如何调试实际的错误是什么?

编辑:我正在https://blog.lextudio.com/2015/11/jexus-manager-secrets-behind-visual-studio-iis-express-integration/查看详细信息

我的csproj 文件似乎缺少该页面中的许多与 IIS 相关的标签,我添加它们是为了机会,但它仍然失败:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <UseIISExpress>true</UseIISExpress>
  </PropertyGroup>
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <StartPageUrl>
          </StartPageUrl>
          <StartAction>CurrentPage</StartAction>
          <AspNetDebugging>True</AspNetDebugging>
          <SilverlightDebugging>False</SilverlightDebugging>
          <NativeDebugging>False</NativeDebugging>
          <SQLDebugging>False</SQLDebugging>
          <ExternalProgram>
          </ExternalProgram>
          <StartExternalURL>
          </StartExternalURL>
          <StartCmdLineArguments>
          </StartCmdLineArguments>
          <StartWorkingDirectory>
          </StartWorkingDirectory>
          <EnableENC>True</EnableENC>
          <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</Project>

编辑: This dev has the same problems

【问题讨论】:

标签: asp.net visual-studio iis visual-studio-2015


【解决方案1】:

卸载 VS 和 IIS,然后按照 here to completely burn VS 的建议使用 this Microsoft tool

重新安装了VS,它正在工作。

谢谢大家。

【讨论】:

    猜你喜欢
    • 2011-09-04
    • 2014-04-05
    • 2018-04-26
    • 1970-01-01
    • 2020-10-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多