开发者

How do I solve an <authentication mode="Forms"> Server Error?

I've made an ASP.NETapplication in Visual Studio. When it was ready I did "Publish Website". I placed the created folder on my website.

When I go to the application on my site, I get the following error:

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 47:      ASP.NET to identify an incoming user. 
Line 48:      -->
Line 49:      <authentication mode="Forms" />
Line 50:      
Line 51:      <c开发者_高级运维ustomErrors mode="Off">

Source File: \CLST_SMB1IIS\WebfarmData$\WebData\winckelmans.net\wwwroot\bookstore\web.config Line: 49

How do I solve this?


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.

As it says, the Virtual Directory is not being configured as an ASP.NET application.

You may have to go to your IIS admin console, go to the directory properties and select "Create Application". To do so:

  • Open the IIS Administration Console on the server where the application is published
  • Right click on the Virtual Directory where the application files are published
  • Select Properties, then a "Main Properties" dialog pops up.
  • There is a "Application Settings" section. Just hit "Create" in front of the "Application Name" textbox, then hit "Ok"
  • Check that the Virtual Directory appears with a different icon, it should be ok now.


My issue was with an ASP.NET Web API application that had more than one web.config (one in root and other in the Views folder). I'd mistakenly added the configuration in the sub folder and left the root folder unchanged to using "None".


Copy your folder which contains your content under wwwroot directory.

Then open IIS Manager. Find Sites->Default Web Site->YourContentFolder right click on it select "convert to application" Then it should be OK...


I had this issue when I upgraded a project containing Telerik ASP.NET UI controls. When the upgrade ran I forgot to untick the "backup" check box and a backup copy was put inside my solution. This resulted in two copies of web.config - deleted the backup folder and all was well again.


go to "Run" "ïnetmgr" then in the left menu default website then select your web folder -> right click on your web folder ->and select convert to application

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜