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.

I was trying to apply subdomain redirection on a website, say website1(subdomain1.website1.com). For that I copied the whole code of another website (website2), pasted it in a folder under the root of website1 (website1.com/folder1). I was planning to redirect subdomain1.website1.com

Read More 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.