DotNetNuke Module Error " It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level."

When creating a DNN C# module using a starter kit on this website, for example, you may encounter the following error when trying to run the module:
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.
Taken a look at the solution created by the starter kit, it creates a web.config file.
This file is what causes the problem.
Just deleting it or renaming it to something else like web.config.bak solves the problem :)
Bookmark and Share