【问题标题】:Deploy asp.net website in IIS 7.5 locally在IIS 7.5本地部署asp.net网站
【发布时间】:2012-07-17 09:43:39
【问题描述】:

在 11s 7.5 中部署网站时出现此错误:

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

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 16:     <compilation debug="true" targetFramework="4.0" />
Line 17: 
Line 18:     <authentication mode="Forms">
Line 19:       <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
Line 20:     </authentication>

源文件:C:\Users*\Documents\Visual Studio 2010\Projects\web\web\web.config 行:18

我正在尝试在本地部署我的网站以进行测试。

【问题讨论】:

标签: asp.net windows-7 iis-7.5


【解决方案1】:

查看以下解决方案:

  1. 删除 bin 和 obj 文件夹,运行 Clean Solution 并重新构建,错误消失。

  2. 检查运行站点的应用程序池,确保应用程序池使用的是 .NET 4.0 Framework(而不是 .NET 2.0 Framework)。

【讨论】:

  • 我没有 bin 和 obj 文件夹。
  • 它在 v4.0 上运行。我仍然得到同样的错误。我已经编辑了我的帖子以显示源文件。
  • 我重新开始,这是我现在得到的错误: 第 1 行:
猜你喜欢
  • 1970-01-01
  • 2013-03-03
  • 1970-01-01
  • 1970-01-01
  • 2011-10-06
  • 1970-01-01
  • 2011-08-06
  • 2012-06-28
  • 1970-01-01
相关资源
最近更新 更多