This project is read-only.

Implementation of blogEngine

Aug 6, 2007 at 1:41 PM
Edited Aug 6, 2007 at 2:18 PM
I'm a beginner and i really don't know how to implement this blogengine.
i'm working in C#.Net 2.0. i've created a new website folder named BLogEngine.NET.
i've inclded all the pages and folders of the project into this website folder but when i try to run it, this shows an error :
"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."

<?xml version="1.0"?>

<sectionGroup name="BlogEngine">
<section name="blogProvider" requirePermission="false" type="BlogEngine.Core.Providers.BlogProviderSection, BlogEngine.Core" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>

<blogProvider defaultProvider="XmlBlogProvider">
<add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider"/>
<add name="MSSQLBlogProvider" type="BlogEngine.Core.Providers.MSSQLBlogProvider"/>

<connectionStrings configSource="sql.config" />


<compilation debug="true" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
<httpRuntime enableVersionHeader="false" sendCacheControlHeader="true" />
<trust level="High" />

validation="SHA1" decryption="AES"

<authentication mode="Forms">
<forms timeout="129600" name=".AUXBLOGENGINE" protection="All" slidingExpiration="true" loginUrl="~/login.aspx" />

<pages enableSessionState="false" enableViewStateMac="true" enableEventValidation="true">
<add namespace="Controls" tagPrefix="blog"/>

<customErrors mode="RemoteOnly">
<error statusCode="404" redirect="~/error404.aspx" />

<membership defaultProvider="XmlMembershipProvider">
<clear />
<add name="XmlMembershipProvider" type="BlogEngine.Core.Providers.XmlMembershipProvider" description="XML membership provider" xmlFileName="~/App_Data/users.xml"/>

<siteMap defaultProvider="PageSiteMap" enabled="true">
<add name="PageSiteMap" description="The site map provider that reads in the .sitemap XML files." type="BlogEngine.Core.Web.PageSiteMap"/>

<add name="UrlRewrite" type="BlogEngine.Core.Web.HttpModules.UrlRewrite"/>
<add name="CompressionModule" type="BlogEngine.Core.Web.HttpModules.CompressionModule"/>
<add name="ReferrerModule" type="BlogEngine.Core.Web.HttpModules.ReferrerModule"/>
<add name="WwwSubdomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubdomainModule"/>

<add verb="*" path="microsummary.axd" type="BlogEngine.Core.Web.HttpHandlers.MicroSummary" validate="false"/>
<add verb="*" path="file.axd" type="BlogEngine.Core.Web.HttpHandlers.FileHandler" validate="false"/>
<add verb="*" path="image.axd" type="BlogEngine.Core.Web.HttpHandlers.ImageHandler" validate="false"/>
<add verb="*" path="syndication.axd" type="BlogEngine.Core.Web.HttpHandlers.SyndicationHandler" validate="false"/>
<add verb="*" path="commentfeed.axd" type="BlogEngine.Core.Web.HttpHandlers.CommentFeedHandler" validate="false"/>
<add verb="*" path="sitemap.axd" type="BlogEngine.Core.Web.HttpHandlers.Sitemap" validate="false"/>
<add verb="*" path="trackback.axd" type="BlogEngine.Core.Web.HttpHandlers.TrackbackHandler" validate="false"/>
<add verb="*" path="pingback.axd" type="BlogEngine.Core.Web.HttpHandlers.PingbackHandler" validate="false"/>
<add verb="*" path="opensearch.axd" type="BlogEngine.Core.Web.HttpHandlers.OpenSearchHandler" validate="false"/>
<add verb="*" path="metaweblog.axd" type="BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler" validate="false"/>
<add verb="*" path="rsd.axd" type="BlogEngine.Core.Web.HttpHandlers.RsdHandler" validate="false"/>
<add verb="*" path="css.axd" type="BlogEngine.Core.Web.HttpHandlers.CssHandler" validate="false"/>
<add verb="*" path="rating.axd" type="BlogEngine.Core.Web.HttpHandlers.RatingHandler" validate="false"/>
<add verb="*" path="opml.axd" type="BlogEngine.Core.Web.HttpHandlers.OpmlHandler" validate="false"/>


Can somebody Pls. tell me how to resolve it. Its urgent.

Aug 6, 2007 at 2:37 PM
This is because you are running the website from the IIS and haven't made the blogengine folder an application. In IIS admin right-click the blogengine folder and write an application name. That makes it an application and it will run fine.
Aug 7, 2007 at 11:21 AM
Edited Aug 7, 2007 at 11:27 AM

Thanks for your help.
Another question as we are running this as an application can we embed this code in our website project which is in 2.0 with c sharp and if yes can you guide us with the procedure
now that previous error is removed but some new errors arised. Few of the them are listed below. Can you please provide your help for these also:
I've included "DotNetSlave.BusinessLogic" folder in this application.

Error 1 The type or namespace name 'BlogEngine' could not be found (are you missing a using directive or an assembly reference?) C:\Inetpub\wwwroot\BlogEngine.NET\App_Code\Controls\CategoryList.cs 9 7 C:\...\BlogEngine.NET\

Error 2 The type or namespace name 'BlogEngine' could not be found (are you missing a using directive or an assembly reference?) C:\Inetpub\wwwroot\BlogEngine.NET\App_Code\Controls\PostCalendar.cs 10 7 C:\...\BlogEngine.NET\

Error 3 The type or namespace name 'BlogEngine' could not be found (are you missing a using directive or an assembly reference?) C:\Inetpub\wwwroot\BlogEngine.NET\App_Code\Controls\SearchBox.cs 7 7 C:\...\BlogEngine.NET\

Error 4 The type or namespace name 'BlogEngine' could not be found (are you missing a using directive or an assembly reference?) C:\Inetpub\wwwroot\BlogEngine.NET\App_Code\Controls\RecentPosts.cs 8 7 C:\...\BlogEngine.NET\

Error 5 The type or namespace name 'BlogEngine' could not be found (are you missing a using directive or an assembly reference?) C:\Inetpub\wwwroot\BlogEngine.NET\App_Code\Controls\Blogroll.cs 15 7 C:\...\BlogEngine.NET\

Oct 15, 2007 at 10:51 AM
Edited Oct 15, 2007 at 11:03 AM
I have the same problem :(
It's sad that forumsharry hasn't shared his problem solution,
can anybody provide me with a solution for the problem named in the first post from forumsharry?


the first project at: C:\Inetpub\wwwroot\project\
the blog engine at: C:\Inetpub\wwwroot\project\blog\
are configured as applications on my IIS

-The Blogengine itself runs on my IIS if it's not inside the Subdirectory of another Project
-Both, are C# .net 2.0 Projects

And btw yes it's urgent too.
So Thanks Deluxe if sobody could help me fast.
Oct 15, 2007 at 5:50 PM
forumsharry's second issue and phew - it looks like your using the source code download and the BlogEngine.Core.dll file isn't being compiled or is failing to compile.

Your IIS should be set up like this:
  • Create a virtual directory/application on the BlogEngine.Web folder.
  • Open the solution like you normally would, compile the entire solution and try it in your browser (you can't use the right-click "View in browser" because it will start the built-in ASP.NET engine)

You have a number of options after that when you're ready to move it to a production server.