IIS Express在Visual Studio 2012中无法工作

8
我不能通过IIS Express运行Visual Studio应用程序。第一次运行时,我遇到了“无法启动IIS Express”的错误。 多次调试后,我得到以下错误:enter image description here 如果我通过命令提示符手动运行IIS express,我会收到以下错误:enter image description here 我已经重新安装了IIS Express,但没有变化。 我还修改了IIs express的应用程序主机配置文件,删除了所有应用程序的站点名称,但没有任何变化。
我不知道问题所在。 请给出修复此问题的解决方案。

请提供需要翻译的具体内容。 - Freelancer
1
如果其中任何一个答案对您有用,请标记有效的答案。 - Mike Beeler
2个回答

11

我遇到过相同的问题,这个问题与应用程序池定义有关,你可以在\users{你的用户名}\mydocuments\IISexpress\config\applicationhost.config中找到。

查找标签

<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />

将 .NET 4.5 的 managedruntimeversion 从 "v4.0" 更改为 "v4.0.30319"

<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0.30319" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />  

1
以下是可能对您有帮助的建议:
使用进程监视器来观察iis-express进程,以查看在尝试启动它时是否存在任何权限问题。
为此,请按照此链接进行操作。

http://msdn.microsoft.com/en-us/library/bb399001%28v=vs.100%29.aspx

如果问题与安全有关,则以管理员模式运行Visual Studio。
作为最后的办法,您可以通过修改位于%userprofile%\documents\IISexpress\config目录中的applicationhost.config文件来禁用日志记录模块。
为此,您需要在文件中注释掉一些行。
<system.webServer>/<globalModules>元素下,注释掉该行。
<add name="HttpLoggingModule" image="%IIS_BIN%\loghttp.dll" />

<location>/<system.webServer>/<modules>元素下,注释掉该行。
<add name="HttpLoggingModule" lockItem="true" /> 

在保存更改后,请尝试重新启动 iis express。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接