【发布时间】:2016-06-23 12:29:59
【问题描述】:
我在 Visual Studio Pro 2015 中的 IIS Express 遇到问题。当我尝试启动网站时,出现单行错误
该项目是我编写的,但在我的 HDD 报废后从 TFS 重新加载。如果我创建一个新项目,也会出现同样的错误。
我正在使用存储在project\.vs\config 中的applicationhost.config 文件
我尝试了以下方法:
- 删除
%project%\.vs\config和C:\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>
【问题讨论】:
-
blog.lextudio.com/2015/11/… 请检查您的项目文件。
-
谢谢,我会的,我已经设置了VS安装来修复ant我会检查它什么时候回来
-
@LexLi 我今天早上正在浏览您的链接,我的
csproj文件中没有<IISExpressSSLPort /> <IISExpressAnonymousAuthentication /> <IISExpressWindowsAuthentication /> <IISExpressUseClassicPipelineMode /> <UseGlobalApplicationHostFile />或<UseIIS>True</UseIIS>后面的大部分部分,它们是否默认存在?
标签: asp.net visual-studio iis visual-studio-2015