【发布时间】:2011-09-18 23:02:21
【问题描述】:
所以,我的问题是我有一个相当大的 ASP.NET 3.5 项目,我试图使用 IIS Express 安装在本地运行。我是团队中使用 IIS Express 运行此项目和其他项目的众多开发人员之一,实际上我每天都在运行一个 .NET 4.0 站点(包含本地 SSL),没有任何问题。作为参考,我的机器运行 Windows 7 Ultimate 64 位和 Microsoft Visual Studio 2010,我是本地机器的管理员。 Visual Studio 以管理权限运行,我已确保 inetmgr 中列出的所有应用程序池都在运行。
这是我尝试在本地运行项目时得到的工作流程:
- 当我第一次运行我的项目时,或者如果我删除 Microsoft WebMatrix(IIS Express 的配置实用程序,类似于 inetmgr)中列出的任何站点,我会收到以下消息序列:
(1) 来自 Microsoft Visual Studio 的“是-否”对话框,其中指出,
The local IIS URL @987654321@ specified for Web project My.Web.Project has not been configured. In order to open this project the virtual directory needs to be configured. Would you like to create the virtual directory now?
(2) 此时,我点击“是”。来自 VS 的中间窗口会弹出一个加载栏,达到 50% 左右,然后 VS 会弹出一个警告对话框,内容如下:
Configuring Web @987654322@ for ASP.NET 3.5 failed. You must manually configure this site for ASP.NET 3.5 in order for the site to run correctly. Visual Studio cannot detect whether this virtual root has been configured for use with ASP.NET 2.0 The likely cause is that you do not have sufficient privileges to access the IIS metabase. You may need to manually configure this site for ASP.NET 2.0 in order for your site to run correctly.
(3) 此时我只能单击“确定”或“帮助”,因此我单击“确定”继续。它继续对我的解决方案中配置为在 IIS Express 本地运行的任何其他项目执行相同的过程.
- 当我尝试通过按 CTRL-F5 在本地运行站点时,我收到一个错误对话框,内容为
Unable to launch the IIS Express Web Server - 当我尝试在 Microsoft Web Matrix 中查看有关该站点的详细信息时,我从 WebMatrix 收到一条错误消息,内容为:
An error caused WebMatrix to shut down. Error message: Invalid application pool name - 此错误消息是正确的,除非我查看 IIS Express 配置文件 (C:\%User Dir%\My Documents\IISExpress\config\applicationhost.config),在
<sites>部分中,每个应用程序都有<application>标记,仅指定了path属性,未指定applicationPool属性。 (相反,在 IISExpress 上运行的 4.0 应用程序指定了此属性)。 - 将
applicationPool属性添加到站点后,我可以在WebMatrix 中打开/查看/编辑其详细信息,但仍无法在本地运行。
那么,我做错了什么或者我的机器上的什么配置不正确导致我无法运行,但没有其他开发人员使用相同的代码?
【问题讨论】:
标签: c# asp.net .net-3.5 iis-express