无法启动IIS Web服务器,如何调试

时间:2016-06-23 12:29:59

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

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

enter image description here

该项目是我编写过的,但在我的硬盘被废弃后已从TFS重新加载。如果我创建一个新项目,则会出现同样的错误。

我正在使用applicationhost.config

中存储的project\.vs\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:**

我只在这台电脑上安装了以下软件: Visual Studio Pro 2015, Xamarin Studio 6, Android Studio,和 SQL Server Express 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

1 个答案:

答案 0 :(得分:0)

卸载VS&amp; IIS,然后使用here to completely burn VS跟踪建议this Microsoft tool

重新安装VS,它正在运行。

谢谢大家。