Error in when placing it in sub directory of your hosting

6. November 2012


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. 

Causes : That basically means the web.config file supplied with BlogEngine.NET includes some settings that are application-level. The fact that you are seeing the error means that you have the blog off of the root directory of your site, probably like the following? When you place your code in a sub folder like then it will throw an error 

Now in order to resolve this issue you will have to goto your hosting control panel and and select IIS Management . There will be an option to create a new AppPool . Create a new one and point it to your sub folder which is /blogs . After the creation process is done just reload your webpage on which you have and it will start working .