ASP.NET Error: It is an error to use a section … beyond application level

Today while trying to run a web application that a couple other developers and I are working on, I got the following error when trying to run the application. This error then pointed me to my web.config file.

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

After some digging and talking with another developer, turns out he'd made the Web Site into a full-blown Solution, but I was still trying to open it as a web site. As soon as I opened it up as a Solution (by opening the .sln file) the project built and ran just fine.

Hope it helps, if not, here are some other possible reasons:

← All articles