I'm not an experienced web developer, I usually code apps but I've been asked to look at a website written in C#. I've got a copy of Visual Studio 2012 and I copied the source code into my c:\inetpub\wwwroot folder. When I tried to run it I got an error message about creating a virtual folder as an application so I installed IIS and then created a virtual folder off of wwwroot. That seemed to work as it ran but then crashed as the database was empty. When I corrected the error and tried to run again I got this error.
C:\inetpub\wwwroot\WebApplication2\obj\Debug\Package\PackageTmp\Web.config(36): Build (web): 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.
What have I missed as I've created the virtual directory? I tried deleting the first virtual directory and then creating another within the website folder. That worked again but when it crashed the same thing happened again. Why is this?