I get a configuration error when I execute my application in a subdirectory

You get the following error when attempting to execute an application in a sub directory:

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 7:      <compilation defaultLanguage="vb" debug="true" />
Line 8:  
Line 9:      <authentication mode="Forms">

This error may occur if the application is being run out of a subfolder and the subfolder is not configured in IIS to run as an application.  To resolve this error, you can create an IIS application using the Web Application Tool in the Control Panel. See this Knowledge Base article for more information.

Article ID: 331, Created On: 11/24/2008, Modified: 4/13/2010