Configuration error when executing an application in a subdirectory

If you get the following error when attempting to execute an application in a subdirectory:
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.

Your application is likely being run out of a subdirectory and the subdirectory 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 Control Panel.