Visual Studio 2008 Issue

Oct 22, 2009 at 1:13 AM

Got this error trying to setup the project in Visual Studio 2008,

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

It runs fine in II7, but won't compile to run when I try to debug. Any suggestions?



Oct 22, 2009 at 5:26 AM

If you're opening up just the web project (the main website folder) in Visual Studio, you're probably opening it up via "File -> Open -> Web site..."  When doing this, make sure the folder you select is the main folder containing the BIN, App_Code, App_Data sub-folders.  That folder is usually named "BlogEngine.NET" or "BlogEngine.Web".  If you select one of the parent folders, you'll get that error you described.

Oct 22, 2009 at 2:45 PM

As it turns out, it was the setup folder that was causing the issue. I followed the instructions, which at the end, states to rename the .config file and copy back up to the root of the project. Problem is, the setupfolder with .config file still exisits. VS2008 tries to run but sees 2 web.config files and throws and exception over the MachintToApplication setting used on 2 config files in the same project. I deleted the entire setup folder and contents, then re-compiled the project. No issue.

Thanks BenAmanda for your assistance.