This project is read-only.

How to set up Application Directory in Web Development Server

Topics: ASP.NET 2.0
Jan 13, 2009 at 11:42 PM
I've been trying to install the source version in the existing development instance of my site in a "blog" folder.  I'm getting the,

Error 12 It is an error to use a section registered as allow Definition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS. C:\...\Web.Config 9 

error presumably because I did not set up the folder as an application.  I'm not running IIS on my dev box, just relying on Web Development Server and it's not clear to me how one sets up a folder as an application in that context, especially a sub folder under another root application.
Jan 13, 2009 at 11:54 PM
If you're not running IIS, how do you run your existing blog (the version without the source)?

If you have Visual Studio (VS), you can go File -> Open -> Web Site... and navigate to the new, source version folder.  The "source version folder" should be the BlogEngine.NET folder, not the DotNetSlave.BusinessLogic folder.  Once that's open, F5 or Ctrl-F5 should build the source version of the blog and then open up the source version in your browser.  You'll be using VS's built-in web server at this point.

You will need the compiled BlogEngine core files to be in the BIN folder.
Jan 14, 2009 at 1:15 AM
Also, I'm guessing you won't get any errors when running the source version in VS if the folder you opened is the source version folder.  But, you would likely get the error you posted if you open the parent folder of the source version in VS and run the website.  I could be mistaken, but I don't think there's any simple way around this as it's a limitation of VS to not understand sub-applications.  The best thing to do would be to install the source version into a folder outside your main blog folder.  So if you're existing blog is at c:\blog, then installing the source version in c:\sourceVersion should eliminate this problem.