简体   繁体   English

在IIS 7.5中本地部署asp.net网站

[英]Deploy asp.net website in IIS 7.5 locally

I get this error when deploying website in 11s 7.5 : 在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>

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

I am trying to deploy my website locally for testing. 我正在尝试在本地部署我的网站以进行测试。

Check out with follwing solution: 签出以下解决方案:

  1. Delete the bin and obj folders, run a Clean Solution and built it again, the error goes away. 删除bin和obj文件夹,运行“清理解决方案”,然后再次构建它,错误消失了。

  2. check the Application Pool the site is running under to make sure the Application Pool is using the .NET 4.0 Framework (instead of .NET 2.0 Framework). 检查站点正在其下运行的应用程序池,以确保该应用程序池使用的是.NET 4.0 Framework(而不是.NET 2.0 Framework)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM