Authentication Mode = Forms Error

I created an ASP.net application 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 while processing a configuration file is required to service this request. Check the specific error below and the configuration file.

Parser error message : it is an error to use a section registered as allowDefinition = 'MachineToApplication' above the application level. This error may be caused by a virtual directory that is not 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: <customErrors mode="Off"> 

Original file:
\ CLST_SMB1IIS \ WebfarmData $ \ WebData \ winckelmans.net \ wwwroot \ bookstore \ web.config Line: 49


How to solve this?


Thanks,
Vincent

+7
authentication
source share
5 answers

"Error using the partition registered as allowDefinition = 'MachineToApplication' outside of the application layer. This error may be caused by the virtual directory not being configured as an application in IIS."

As the saying goes, the virtual directory is not configured as an ASP.NET application. You may need to go to the IIS admin console, go to the directory properties and create "Create Application". For this:

  • Open the IIS Administration Console on the server on which the application is published.
  • Right-click the virtual directory in which the application files are published.
  • Select Properties, then the Basic Properties dialog box appears.
  • There is a section "Application Settings". Just click "Create" in front of the "Application Name" text box, then click "OK"
  • Make sure that the virtual directory is displayed with a different icon, now it should be in order.
+6
source share

My problem was an ASP.NET Web API application that had more than one web.config (one in the root and the other in the Views folder). I mistakenly added the configuration to a subfolder and left the root folder unchanged using "No".

+4
source share

Copy your folder containing your content in the wwwroot directory.

Then open IIS Manager. Find Sites-> Default Website-> YourContentFolder right click on it, select "convert to application" Then it should be good ...

+2
source share

I had this problem when I updated a project containing ASP.NET ASP.NET user interface controls. When the update was in progress, I forgot to uncheck the β€œbackup” checkbox and the backup was inserted into my solution. This led to two instances of web.config - deleted the backup folder, and everything was fine again.

+1
source share

All Articles