Cry about...
MS-Windows Troubleshooting

Error: Configuration Error ... This error can be caused by a virtual directory not being configured as an application in IIS


After copying or installing a .NET web-application the following error is observed in the browser when trying to view the site:

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 49:   ...
Line 50:   -->
Line 51:   <authentication mode="Windows" />
Line 52:   <!--   AUTHORIZATION
Line 53:            This section sets ...

Source File: c:\inetpub\wwwroot\somewhere\web.config   Line: 51


This error is generated because the default set of configuration values in web.config require IIS to treat the web site as an application but this has not been configured.


  1. Run Internet Services Manager (under Control Panel > Administrative Tools)
  2. Find the project in the list of projects. (Open up your computer in the list and look under "Default Web Site").
  3. Bring up its properties (Right click > Properties).
  4. If the "application name" (under "Application Settings" on the "Directory" tab) is greyed out then click '[Create]' and then '[OK]'.

These notes have been tested on Windows 2000 Workstation and Windows 2003 server, and may apply to other versions as well.

About the author: is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.