部署在本地IIS服务器中的ASP.Net网站始终返回错误

问题描述:

Hello Coders,
我有一个使用ASP.Net 4(ASP.Net& VB)准备的小型网站.如果我从IDE运行它,它将运行没有问题.当我尝试在本地IIS Server 7上部署它时,这是我收到的消息:

Hello Coders,
I have a small web site prepared with ASP.Net 4 (ASP.Net & VB). If I run it from the IDE, It runs without a problem. When I try to deploy it on my local IIS Server 7, this is the message I receive:

Server Error in '/' Application.
--------------------------------------------------------------------------------

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 11:    <system.web>
Line 12:        <compilation debug="true" strict="false" explicit="true" targetFramework="4.0"/>
Line 13:        <authentication mode="Windows">
Line 14:    <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
Line 15:   </authentication>


Source File: D:\inetpub\wwwroot\estaids\web.config    Line: 13



Show Additional Configuration Errors:


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. (D:\inetpub\wwwroot\estaids\web.config line 16)
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. (D:\inetpub\wwwroot\estaids\web.config line 22)
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. (D:\inetpub\wwwroot\estaids\web.config line 28)




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016




有人可以帮忙吗?
谢谢,我感谢这个美好的社区!
Sylvester




Can any one please help?
Thanks and I am grateful to this wonderful community!
Sylvester

选中此选项.

http://web-geeks.blogspot.in/2008/04/it-is-error-to-use-section-registered.html [
Check this.

http://web-geeks.blogspot.in/2008/04/it-is-error-to-use-section-registered.html[^]


尝试将您的应用程序池更改为4.0,然后尝试再次访问您的应用程序.

请参阅此链接以供参考.

在IIS 7.0上部署ASP.NET网站 [ ^ ]
Try to change your application pool to 4.0 and try again to access your application.

please see this link for your reference.

Deploying ASP.NET Websites on IIS 7.0 [^]


是的,因为您的网站部署不正确,这就是为什么您会收到此错误的原因.
请参考以下链接:
从Visual Studio 2010将Asp.net应用程序快速部署到IIS的步骤 [^ ]
使用Web部署程序包部署Web应用程序项目 [此处 [此处 [ ^ ]是您得到的描述.


--Amit
Yes, because your website is not deployed correctly, that is why you are getting this error.
Refer the links below:
Steps of quick deployment of Asp.net applications into IIS from Visual Studio 2010[^]
Deploying a Web Application Project Using a Web Deployment Package[^]
Here[^] is a pdf which demonstrate the asp.net application deployment.

And here[^] is the description which you are getting.


--Amit