【发布时间】:2011-05-01 05:33:53
【问题描述】:
我开发了一个小型 ASP.NET 3.5 应用程序。只有几页,没有数据库连接。我正在尝试发布它,但我的网站出现错误:
**Parser Error Message:** It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
**Source Error:**
Line 45:
Line 46: -->
Line 47: <authentication mode="None"/>
Line 48: <!--
Line 49: The <customErrors> section enables configuration
我正在使用带有 IIS 7 的 Windows 7。当我在 IIS 中添加新网站时,这里有一些问题。以下是显示引擎盖出现问题的图像:
- 为基于 .NET 3.5 构建的应用程序创建新应用程序池时,我在列表中看不到 .NET Framework 3.5:
- 当我打开“添加网站”对话框并单击“测试设置”时,出现以下错误:
请告诉我如何解决此问题。我也想知道是加网站还是加虚拟目录?
【问题讨论】:
-
.net 3.5 与 2.0 的 CLR 相同,因此您确实希望在应用程序池中选择 2.0
-
我曾经选择过,但在下一个级别仍然失败。
-
您的网站/vdir 是否指向网络位置?现在 iis 有一些非常复杂的规则,我几乎每次都必须用谷歌搜索修复。
标签: asp.net iis-7 asp.net-3.5