Click Here To Get Amazing Facebook Profile Covers,Status Messages

Configuration error- authentication mode = "Windows" in web.config of ASP.NET

This article tell how to resolve configuration error in line authentication mode = "Windows" line of web.config file for your asp dot net web application. The error comes like this in your web browser.
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 37: by Microsoft that offers a single logon and core profile services for member sites.
Line 38: -->
Line 39: < authentication mode = "Windows" />
Line 40:
Line 41:

Source File: C:InetpubwwwrootMyreportsweb.config Line: 39

The above error comes in situation when you have manually created the virtual directory and have not configured this as an application. In this case you won't be able to browse the application. IIS Server needs your virtual directory to be configured as an application.

In above scenario I transferred my web application folder myreports from one machine to another and created virtual directory with alias JMS and browsed to the Myreports folder using url http:// localhost /JMS / report.aspx which resulted above error.

To resolve this issue or make your virtual directory an application
Go to IIS (Control Panel -> Administrative Tools -> Internet information Services)
Go to Default Website
Select the Virtual Directory (in my case JMS) from list

Right Click it
Select properties
And then click on Create button next to the Application's textbox
It will create the application with the same name as of virtual directory name. Now you can access your application
If we create a new web application using visual studio.net, it automatically creates the virtual directory and configures it as an application

Your rating: None Average: 3 (2 votes)