Integrating BlogEngine

Lots of people have this query on how to integrating BlogEngine to an existing site. Here is the solution that explains how to integrate blogengine.net into existing site.

- Copy BlogEngine code to a subfolder of your existing site, say it Blogs.

- Make the following changes from you BlogEngine web.config file into your application web.config file,

1 – Find and copy the following code from your BlogEngine web.config file and paste it in your Web Application web.config file under “configSections” tag,

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

2 – Find and copy the following code from your BlogEngine web.config file and paste it in your web application web.config file just after “configSections” tag,

<BlogEngine>
 <blogProvider defaultProvider="DbBlogProvider">
 <providers>
 <add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider, BlogEngine.Core"/>
 <add name="DbBlogProvider" type="BlogEngine.Core.Providers.DbBlogProvider, BlogEngine.Core" connectionStringName="BlogEngine"/>
 </providers>
 </blogProvider>
</BlogEngine>

3 – Add the connection string if you have not already have one.

4 – If you don’t already have connection string in your existing web application web.config file, find and copy the following code in your BlogEngine web.config file, and paste it after the “BlogEngine” tag from the above step,

<connectionStrings>
 <clear/>
 <add name="LocalSqlServer" connectionString="dummy"/>
 <!-- Mono complains if LocalSqlServer isn't specified -->
 <add name="BlogEngine" connectionString="Data Source=192.168.0.59;User ID=sa;Password=magnet;persist security info=False;initial catalog=new_BlogEngine;" providerName="System.Data.SqlClient"/>
</connectionStrings>

5 – Find and copy everything within “appSettings” tag from BlogEngine web.config, and paste it within “appSettings” tag in your web application web.config file,

<appSettings>
 <add key="BlogEngine.FileExtension" value=".aspx"/>
 <!-- You can e.g. use "~/blog/" if BlogEngine.NET is not located in the root of the application -->
 <add key="BlogEngine.VirtualPath" value="~/blogs/"/>
 <!-- The regex used to identify mobile devices so a different theme can be shown -->
 <add key="BlogEngine.MobileDevices" value="(nokia|sonyericsson|blackberry|samsung|sec\-|windows ce|motorola|mot\-|up.b|midp\-)"/>
 <!-- The name of the role with administrator permissions -->
 <add key="BlogEngine.AdminRole" value="Administrators"/>
 <!--This value is to provide an alterantive location for storing data.-->
 <add key="StorageLocation" value="~/Blogs/App_Data/"/>
 <!--A comma separated list of script names to hard minify. It's case-sensitive. -->
 <add key="BlogEngine.HardMinify" value="blog.js,widget.js,WebResource.axd"/>
</appSettings>

NOTE: I have copy pasted “appSettings” tag for your reference, you should not include “appSettings” tag and copy everything within it.

NOTE: I have changed the value of “BlogEngine.VirtualPath” to refer to our sub directory rather than the top level directory.

6 – Find and copy everything within “assemblies” tag from your BlogEngine web.config file, and paste it within “assemblies” tag of your web application web.config file.

NOTE: Paste only those tags within “assemblies” tag which do not already exists.

<compilation>
<assemblies>
 <add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
 <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
 <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
 <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
 <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
 <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
 <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>

NOTE: I have copy pasted “assemblies” tag for your reference, you should not include “assemblies” tag and copy everything within it.

7 – Find and copy the following line from BlogEngine web.config, and paste it in your web application web.config file just under “compilation” tag from above point,

NOTE: Paste this code in your web application web.config file only if already does not exists.

<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="auto" uiCulture="auto"/>

8 – Find and copy the following line from BlogEngine web.config, and paste it in your web application web.config file just under “globalization” tag from above point,

NOTE: Paste this code in your web application web.config file only if already does not exists.

<httpRuntime enableVersionHeader="false" useFullyQualifiedRedirectUrl="true" maxRequestLength="16384" executionTimeout="3600" requestLengthDiskThreshold="16384"/>

9 – Find and copy the following line from BlogEngine web.config, and paste it in your web application web.config file just under “httpRuntime” tag from above point,

NOTE: Paste this code in your web application web.config file only if already does not exists.

<machineKey validationKey="D9F7287EFDE8DF4CAFF79011D5308643D8F62AE10CDF30DAB640B7399BF6C57B0269D60A23FBCCC736FC2487ED695512BA95044DE4C58DC02C2BA0C4A266454C" decryptionKey="BDAAF7E00B69BA47B37EEAC328929A06A6647D4C89FED3A7D5C52B12B23680F4" validation="SHA1" decryption="AES"/>

10 – Change the authentication mode in your web application web.config file to “Forms” and find and copy the following line from BlogEngine web.config, and paste it in your web application web.config within “authentication” tag,

NOTE: if you want to use your own form for authentication then change the value of the “loginUrl” attribute of the “form” tag to the login page from your site.

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

NOTE: I have copy pasted “authentication” tag for your reference, this tag will already be there in your web application web.config file, so just check the “mode” of authentication and the “loginUrl” value of the form tag.

11 – Find and copy the following line from BlogEngine web.config, and paste it in your web application web.config file

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

NOTE: Paste this code in your web application web.config file only if already does not exists. If it already exists just copy everything within “controls” tag from you BlogEngine web.config file and paste in within “controls” tag of your web application web.config file.

NOTE: I have copy pasted “pages” and “controls” tags for your reference, you should not include “pages” and “controls” tag if they already exists and copy everything within it. If they don’t exists then copy the entire “page” tag.

12 – Change the custom error mode in your web application web.config file if you want to redirect user to “error page”.

NOTE: if you want to use your own error page change the value of the “mode” attribute of the “customErrors” tag and the value of “redirect” attribute of the “error” tag within it, as per your requirements,

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

13 – Find and copy the following line from BlogEngine web.config, and paste it in your web application web.config file just after “customErrors” tag from above point,

NOTE: Paste this code in your web application web.config file only if already does not exists.

<membership defaultProvider="DbMembershipProvider">
 <providers>
 <clear/>
 <add name="XmlMembershipProvider" type="BlogEngine.Core.Providers.XmlMembershipProvider, BlogEngine.Core" description="XML membership provider" passwordFormat="Hashed"/>
 <add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="BlogEngine" applicationName="BlogEngine"/>
 <add name="DbMembershipProvider" type="BlogEngine.Core.Providers.DbMembershipProvider, BlogEngine.Core" passwordFormat="Hashed" connectionStringName="BlogEngine"/>
 </providers>
</membership>
<roleManager defaultProvider="DbRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".BLOGENGINEROLES">
 <providers>
 <clear/>
 <add name="XmlRoleProvider" type="BlogEngine.Core.Providers.XmlRoleProvider, BlogEngine.Core" description="XML role provider"/>
 <add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="BlogEngine" applicationName="BlogEngine"/>
 <add name="DbRoleProvider" type="BlogEngine.Core.Providers.DbRoleProvider, BlogEngine.Core" connectionStringName="BlogEngine"/>
 </providers>
</roleManager>

NOTE: if these tags already exists just copy paste the content within “providers” tag and paste it within respective tag.

14 – Find and copy the following line from BlogEngine web.config, and paste it in your web application web.config file just after “roleManager” tag from above point,

NOTE: Paste this code in your web application web.config file only if it does not exists.

<siteMap defaultProvider="PageSiteMap" enabled="true">
 <providers>
 <add name="PageSiteMap" description="The site map provider that reads in the .sitemap XML files." type="BlogEngine.Core.Web.Controls.PageSiteMap, BlogEngine.Core"/>
 <add name="SecuritySiteMap" description="Used for authenticated users." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" securityTrimmingEnabled="true" siteMapFile="Web.sitemap"/>
 </providers>
</siteMap>

NOTE: if these “siteMap” tag already exists just copy paste the content within “providers” tag and paste it within your web application “provider” tag within “siteMap” tag.

15 – Find the “httpModules” tag within “system.web” tag in BlogEngine web.config and copy the content within “httpModules” tag, and paste it in “httpModules” tag within “system.web” tag within your Web Application web.config

<httpModules>
 <add name="WwwSubDomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubDomainModule, BlogEngine.Core"/>
 <add name="UrlRewrite" type="BlogEngine.Core.Web.HttpModules.UrlRewrite, BlogEngine.Core"/>
 <add name="CompressionModule" type="BlogEngine.Core.Web.HttpModules.CompressionModule, BlogEngine.Core"/>
 <add name="ReferrerModule" type="BlogEngine.Core.Web.HttpModules.ReferrerModule, BlogEngine.Core"/>
 <!--Remove the default ASP.NET modules we don't need-->
 <remove name="PassportAuthentication"/>
 <remove name="Profile"/>
 <remove name="AnonymousIdentification"/>
</httpModules>

NOTE: If any of the “add” tag already exists in “httpModules” tag in your Web Application web.config, do not copy it again. Make sure you only have one copy of each “add” tag within “httpModules”.

16 – Find the “httpHandlers” tag within “system.web” tag in BlogEngine web.config and copy the content within “httpHandlers” tag, and paste it in “httpHandlers” tag within “system.web” tag within your Web Application web.config

<httpHandlers>
 <add verb="*" path="file.axd" type="BlogEngine.Core.Web.HttpHandlers.FileHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="image.axd" type="BlogEngine.Core.Web.HttpHandlers.ImageHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="syndication.axd" type="BlogEngine.Core.Web.HttpHandlers.SyndicationHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="sitemap.axd" type="BlogEngine.Core.Web.HttpHandlers.SiteMap, BlogEngine.Core" validate="false"/>
 <add verb="*" path="trackback.axd" type="BlogEngine.Core.Web.HttpHandlers.TrackbackHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="pingback.axd" type="BlogEngine.Core.Web.HttpHandlers.PingbackHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="opensearch.axd" type="BlogEngine.Core.Web.HttpHandlers.OpenSearchHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="metaweblog.axd" type="BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="rsd.axd" type="BlogEngine.Core.Web.HttpHandlers.RsdHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="css.axd" type="BlogEngine.Core.Web.HttpHandlers.CssHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="js.axd" type="BlogEngine.Core.Web.HttpHandlers.JavaScriptHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="rating.axd" type="BlogEngine.Core.Web.HttpHandlers.RatingHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="opml.axd" type="BlogEngine.Core.Web.HttpHandlers.OpmlHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="blogml.axd" type="BlogEngine.Core.Web.HttpHandlers.BlogMLExportHandler, BlogEngine.Core" validate="false"/>
 <add verb="*" path="sioc.axd" type="BlogEngine.Core.Web.HttpHandlers.Sioc, BlogEngine.Core" validate="false"/>
 <add verb="*" path="apml.axd" type="BlogEngine.Core.Web.HttpHandlers.Apml, BlogEngine.Core" validate="false"/>
 <add verb="*" path="foaf*.axd" type="BlogEngine.Core.Web.HttpHandlers.Foaf, BlogEngine.Core" validate="false"/>
</httpHandlers>

NOTE: If any of the “add” tag already exists in “httpHandlers” tag in your Web Application web.config, do not copy it again. Make sure you only have one copy of each “add” tag within “httpHandlers”.

17 – Find the “modules” tag within “system.webServer” tag in BlogEngine web.config and copy the content within “modules” tag, and paste it in “modules” tag within “system.webServer” tag within your Web Application web.config

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

NOTE: If any of the “add” tag already exists in “modules” tag in your Web Application web.config, do not copy it again. Make sure you only have one copy of each “add” tag within “modules”.

18 – Find the “handlers” tag within “system.webServer” tag in BlogEngine web.config and copy the content within “handlers” tag, and paste it in “handlers” tag within “system.webServer” tag within your Web Application web.config

<handlers accessPolicy="Read, Write, Script, Execute">
 <add name="FileHandler" verb="*" path="file.axd" type="BlogEngine.Core.Web.HttpHandlers.FileHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="ImageHandler" verb="*" path="image.axd" type="BlogEngine.Core.Web.HttpHandlers.ImageHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="Syndication" verb="*" path="syndication.axd" type="BlogEngine.Core.Web.HttpHandlers.SyndicationHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="Sitemap" verb="*" path="sitemap.axd" type="BlogEngine.Core.Web.HttpHandlers.SiteMap, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="Trackback" verb="*" path="trackback.axd" type="BlogEngine.Core.Web.HttpHandlers.TrackbackHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="Pingback" verb="*" path="pingback.axd" type="BlogEngine.Core.Web.HttpHandlers.PingbackHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="OpenSearch" verb="*" path="opensearch.axd" type="BlogEngine.Core.Web.HttpHandlers.OpenSearchHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="MetaWeblog" verb="*" path="metaweblog.axd" type="BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="RSD" verb="*" path="rsd.axd" type="BlogEngine.Core.Web.HttpHandlers.RsdHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="CssHandler" verb="*" path="css.axd" type="BlogEngine.Core.Web.HttpHandlers.CssHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="Javascript" path="js.axd" verb="*" type="BlogEngine.Core.Web.HttpHandlers.JavaScriptHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="Rating" verb="*" path="rating.axd" type="BlogEngine.Core.Web.HttpHandlers.RatingHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="Opml" verb="*" path="opml.axd" type="BlogEngine.Core.Web.HttpHandlers.OpmlHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="BlogML" verb="*" path="blogml.axd" type="BlogEngine.Core.Web.HttpHandlers.BlogMLExportHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="SIOC" verb="*" path="sioc.axd" type="BlogEngine.Core.Web.HttpHandlers.Sioc, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="Apml" verb="*" path="apml.axd" type="BlogEngine.Core.Web.HttpHandlers.Apml, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
 <add name="Foaf" verb="*" path="foaf*.axd" type="BlogEngine.Core.Web.HttpHandlers.Foaf, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
</handlers>

NOTE: If any of the “add” tag already exists in “handlers” tag in your Web Application web.config, do not copy it again. Make sure you only have one copy of each “add” tag within “handlers”.

19 – Move directories from BlogEngine.Web/App_Code under your Web Application/App_code

20 – Move directories from BlogEngine.Web/App_GlobalResources under your Web Application/App_GlobalResources.

21 – Add reference to BlogEngine.Core.Dll in your application.

Please drop me a comment if you have any doubts or you liked this post.

Hope this helps :)

  • Share/Bookmark


86 Responses to “Integrating BlogEngine”

  1. Hi there – I am currently reviewing several blog pacakges to add to a website and don’t want the blog section to be any different thematically than the rest of the site (the user shouldn’t be aware that they are in a 3rd party coded portion of the site)… Can you give a URL where you’ve added BE to an existing site? Is it possible to just display certain core aspects (i.e. Posts, Categories) of BE on an existing aspx page/master page (this is what I’m really aiming for)? Thanks!

  2. Neil F says:

    Thanks for this information, I have been looking for something like this! … do you happen to have the steps for copying the files to a web application?

    • Ajay Matharu says:

      @Neil – you just have to copy those files, what steps you need, just let me know, it will be great to help you.

      • Neil F says:

        @Ajay – Thank you very much for helping … I ran into a few problems.
        1)
        I’m not quite sure where to copy the folders from the App_Code since there is no app code in a web app. I tried copying it to the /blog/ folder I created and that works fine for most issues except number 2.
        2)
        I copied the web.config line as you instructed above. The problem is my application doesn’t seem to recognize it. The tag prefix is recognized, however the element is not. The designer cannot load the control either and shows an error. I have played around with the namespace using my own which look like myapp.mynamespace.Controls and that does not work either. I can get rid of the error by entering a register at the top of every page with the issue, but I fear this my disrupt the scalability and flexibility of the application so I would like to stick as much as possible to the original code as possible.
        3)
        Just as a note, I had to run a convert to web application on the entire /blog/ folder. The designer files were all missing and it’s much easier than creating each and generating each by hand.

        At the moment I am currently left with 50 or so compile errors that are almost all related to number two. I know I am just doing something very small incorrectly. Again, I appreciate you taking the time to help me with this.

  3. Ajay

    Your article was very informative. I tried integrating the BlogEngine. I have changed the Web.config and placed the files from BlogEngine AppCode folder to Application AppCode Folder.

    Is there anything i need to do. I m not able to bring up my site after these changes.

    Please help me in solving the issue.

    Thanks
    Panneer Selvam

    • Ajay Matharu says:

      @Panneer – Can you tell me the issue you are facing? I have helped one of the guys to bring integrate and these were the steps we followed. If you are facing any issues let me know I’ll help you sort that out.

  4. Botolo viaggiandoinmoto.it says:

    Ajay,

    after some other things doen together, the blog seems to work. But i still have a problem. When i try to login as Administrator, the system said “Role Function is not enabled”. How it’s possible ?

    Thanks a lot.

    Regards.

    • Ajay Matharu says:

      @Riccardo – Just check first what Provider you are using? XML or SQL?
      after that check which role provider has you mentioned in web.config, in “roleManager” tag.
      if you are using XML then provider should be – defaultProvider=”XmlRoleProvider”
      if you are using SQL then provider should be – defaultProvider=”SqlRoleProvider”

      if this is correct, check if you have the following entry in the appSettings in web.config file,

      Let me know if you need any more assistance.

  5. @Ajay, I m running an application, I want to integrate the blog to it. I just copied the Blogengine web folder and renamed it to Blog and did the above mentioned changes to the web.config.
    Is there any thing i missed out. After doing the changes to the web.config. I m not able to bring up the site.

  6. @Ajay, I m getting Configuration error <add name="XmlMembershipProvider" …
    What could be the problem.

    • Ajay Matharu says:

      @Panneer – are you using XML Provider or SQL if you are using XML provider delete all the tags related to XML provider from Web.Config file or comment that.
      Do take backup of your web.config file before making any further changes. But sometimes XML provider gives error I had the same issue but since I was using SQL Provider I commented all the XML provider related stuff from the web.config file and it worked like a charm. Later I deleted that commented code.

  7. Kunal Sidhpura kunalsidhpura.co.nr says:

    Hey Ajay i have perfomed the above steps and i get the first page of my blog for logging in but i get a error
    “Widget Administration not found.”

    The file ‘/production/admin/menu.ascx’ does not exist.X”

    production/blogs is where all the code for Blog is there but it is searching outside the blogs folder for admin/menu.ascx

  8. Thomas pokertrainer.se says:

    Hi Ajay,

    Thanks for a very detailed and informative article!
    I am trying to integrate Blogengine into my application. I have gone through the steps you describe, but now I get a weird problem with my existing application.
    Sometime when I click a link, nothing happens. I click again and the page is loaded. Only happens for some of the pages – but for those it happens all the time. Page_Load is not even run.

    Any idea of what this could be?

    Thanks,
    Thomas

    • Ajay Matharu says:

      Hi Thomas,

      Can you give me link to those pages?
      And does this happen on only one browser or all the browsers(IE, FF etc)?
      Just try it in firefox and check out the error in error console. You can find it under “Tools -> Error Console”. This might help.

      Just let me know if you need any more assistance.

  9. neil says:

    one question, this looks very detailed and before i run through it all, when you say copy from the webconfig in the BE folder into the webconfig in my root, do i then have to delete the copied lines from the BE webconfig?

    • Ajay Matharu says:

      @Neil – you have to delete the entire web.config file in BE folder. You’ll just have web.config in the root and you have to remove the web.config in the BE folder.
      NOTE – Do backup everything before deleting the web.config in the BE folder

  10. Norman Domingo xflatfeemls.net says:

    Hi Ajay,

    Thanks for sharing your ideas about BE. Very informative and helpfull.

    I also like the design of your site. Particularly the way you changed the Categories portion to use TreeView and rewriting the url to be the category name itself. I wonder if you can share to us what customization you did to make this happen.

    Thanks in advance and more power!

    • Ajay Matharu says:

      @Norman – Thanks :) but this is not BE I use Wordpress and that category tree is widget and URL rewriting have been changed in .htaccess file. You can also do that in BE using URL rewriting

  11. Narashiman says:

    Hi,

    I am trying to integrate the Blogengine Blog and also the jitbit free forum together.
    And i have tried all the permutations and combinations of integrate of integrating them and am getting the error
    Object refrence not set to and instance of the object.

    As both the Blog and Forum have DLL, both needs Default.aspx
    but i can include only one. Can i change the name of the Default.aspx to blog.aspx for blog and make the blog working without the default.aspx, coz i cannot change the name of the default.aspx of the forum page.
    Its compulsary to use the default.aspx page for jitbit forum.

    Please can u help me what to do .!!
    Waiting for your reply.

    My email id is shiman123@rediffmail.com

    Regards
    Narashiman

    • Ajay Matharu says:

      @Narashiman – Yes you can customize BE to have its startup page as blog.aspx and not default.aspx. You have to customize your code so that all the reference to Default.aspx is now to Blog.aspx you can find and replace all the occurrences and rename default.aspx page to blog.aspx page. BE is very customizable you’ll love that :) I just love BE.

      Let me know if you need more assistance

  12. Shila says:

    Hi,
    I have integrate blogengine as a subfolder with in my web project.. Now i am facing problem in opening the pages which are added in BE. I want to open those pages added within BE in my project’s home page

    • Ajay Matharu says:

      you want to open the pages added in BE in your project’s home page? can you elaborate on this? I did not understood this point? can you give me an example? are you going to open this in frames in your home page?

  13. Shila says:

    Hi Ajay,

    Yes.. I want to open the pages added in BE in my projects home page… IN BE after logging in we have widgets right like Page List, Recent Comments and all… In page list the pages added within BE willl appear and when click on that it will open the pages added… The same page list should appear in my projects home page . And clicking on that should open the page added within BE..Means I want the Pagelist to appear for user without logging in to my project.. See in your site http://test.communitycanvas.com/blogs you have Recent Posts know when clicked on it it will show the recent posts added likewise i want the pagelist added within BE to show in the home page of my project but i done want the option to add Pages from here.

    • Ajay Matharu says:

      Hi Shila,

      If you just want to display the post list on your home page, can’t you just copy the contents from the BE home page to your home page? or you want some customization to be made to that? Can you explain that in detail so that I can give you my thought on how you can do that.

  14. Shila says:

    Hi Ajay,
    Thanx, I am able to display it now on my home page. I have one more Question Can you help me it out. Blog Engine default page uses Standard Site Master page. In that We Will get a tags like and .. How that tag apperas in Site.Master.aspx page.In my case When Blog run as a separate projects i am getting that tags but when integrated within my project i am not getting that tags.. if used it will be showing as unrecognized tags And i have used those tags with runat= server attribute But I am not getting those tag id’s in code.

  15. Shila says:

    oh Sorry i dint mention the tag name.. See below is the one which is in site.master page.. I want to know how the appear as a tag in themes/standard/site.Master page.. I am not getting this tag when integrated with my proj….Whether any Namespace shd be used for this… I have already used but still i am not getting

    Powered by BlogEngine.NET
    Theme by Mads Kristensen

  16. Anwar metaoption.com says:

    Hi Ajay,
    Thanks to providing such information to integarte BlogEngine.NET into existing site.
    I have done all steps that you recomended in this Blog.
    I have created manually AppCode folder because my application does not allow to create such a folder, after that in all appcode file or class lose its IntelliSense. Again I have created as it is all classes & pasteted its cotent one by one manually then its IntelliSense is working now.
    When I completed evrething as per your instruction & build my application. I got approx 812 error of cotrol name does not sense or found in my blog application.
    its giving error like
    Errors lists are below
    1. The name ‘btnAdd’ does not exist in the current context
    2. The name ‘grid’ does not exist in the current context
    3. so on
    Thanks a lot

  17. Anwar metaoption.com says:

    Hi Ajay,
    I’m getting only this error
    ERROR : The type or namespace name ‘ExtensionSettings’ could not be found (are you missing a using directive or an assembly reference?)
    ——————–
    In Web.config
    I have used below code in config file
    ——————-
    [

    ]

    Please gulde me, may be I’m making any minor mistake
    Thanks

  18. Anwar metaoption.com says:

    Hi Ajay,
    web config code error is

    The type or namespace name ‘ExtensionSettings’ could not be found (are you missing a using directive or an assembly reference?)

    Please guide me, may be I’m making any minor mistake
    Thanks

    • Ajay Matharu says:

      ExtenstionSettings is in ExtensionManager in App_Code have you properly copied all the code files in App_Code? If that file exists this should not give you an error.

      • Anwar metaoption.com says:

        Hi Ajay,
        Again Thanks for your Instant help. I have done evrything at my level but now only getting error on this “Blogs\default.aspx.cs,
        WebSite\Blogs\post.aspx.cs,
        WebSite\Blogs\widgets\Category list\widget.ascx.cs,
        Blogs\widgets\LinkList\edit.ascx.cs,

        ” only.
        Error are:
        1. The name ‘PostList1′ does not exist in the current context D:\Sempo Institute\Latest Blog Site\WebSite\Blogs\default.aspx.cs
        2. The name ‘divError’ does not exist in the current context D:\Sempo Institute\Latest Blog Site\WebSite\Blogs\default.aspx.cs
        Approx 52 errors
        I know this error comming from user control(BlogEngine.Core.dll) but in this “BlogEngine.Core.dll” I do not thought its having any error.
        Please guide me.
        Thank you.

        • Ajay Matharu says:

          you must have missed something. Its still page reference issues. just see if it contains multiple copies of the same file. or if you have designer.aspx file just delete it and right click the page and select generate web application file. It will automatically generate the designer file with all your control references.

  19. Neo says:

    Hi Ajay,
    What should I do for App_Data folder
    While I’m using SQL not XML DB.
    Plz Suggest me.

    Thank you
    Neo

    • Ajay Matharu says:

      Hi Neo,

      Even if you use SQL and not XML you need to have App_Data because any file you upload in the post goes in App_Data/files so you need to have it in your project.

      • Neo says:

        Hi Ajay,
        Thats Great.
        Where I have to keep this ‘App_Data’ folder. In main application or inside Blog folder.

        Thank you
        Neo

        • Ajay Matharu says:

          You can either have it in the main application or in the blog folder,
          All you have to do is specify where is it in the web.config file like,

          This specifies where is your App_Data folder.

  20. Hi All,

    How to integrate the BE in db driven website. I had DB driven website i want the BE to be integrated into the website. Can u please help me.

    Regards,
    Chary

    • Ajay Matharu says:

      @Rameswara,

      You can create all the BE DB tables into your database and give the connectionstring of your DB in web.config.
      Let me know if you need any more assistance.

      :Ajay

  21. Dennis says:

    This was a great start for integration. I’ve read a few articles on the web and this one had the most detail (and seemingly the most success). I’m having a problem loading the default page for the blog. It just shows gibberish. I didn’t have anything in my web.config file in the root so I just copied the one from the “blogs” directory and updated. I’m running the website as an application, do I need to run the blog as an application as well? Any help is much appreciated.

    Cheers
    Dennis

    • Ajay Matharu says:

      @Dennis – Have you followed the instruction in the post to make the appropriate changes in the web.config file of your application? You don’t have to run the blog application. It’s in the same application, just like you have admin in the same application, so no need to run the blog as separate application. Is your application live? If yes can you give me the link to view?

      Let me know if you need any more assistance.

      • Dennis says:

        Hi Ajay,
        Thanks for your prompt reply. The application isn’t live as I’m in a dev environment. It’s really just a website that uses some features from ASP.NET 2.0 such as masterpages and some components. There wasn’t anything in my web.config file for the application so I just copied the one from blogengine into my root. I made the change at step 5 to update the path. I also had to copy the BlogEngine.Core.dll into my root bin directory in order for my existing pages to work.

        I didn’t run the blog as a separate application and I get the error message “Could not find a part of the path ‘C:\inetpub\wwwroot\testing\website\blog\blog\App_Data\settings.xml’.” I have this in my web.config “” but it seems to be using the current directory and not the root. It works for pages in the root directoy, but not in the blog directory because it’s looking for a blog directory within the blog directory. I’m pretty lost at this point. Thanks for your help!

        Dennis

        • Dennis says:

          Sorry for the confusion. The second paragraph regarding the error message occurs if I run it as a separate application. When I don’t run it as a separate application then I get the gibberish: ��`I�%&/m�{J�J��t��`$ؐ@�������iG#)�*��eVe]f@�흼��{����{����;�N’���?\fdl��J�ɞ!���?~|?”��Ey�’)=��y6�����h��������y�(��G�d^ϲe��!

          • Dennis says:

            Hi Ajay,

            I took a step back and figured out that I was making this too complicated. Since I don’t really have an application, this logic doesn’t apply to my scenario. I ran the blog directory as an application without running the root as an application and it seems to run fine. Thanks for your help and guidance.

            Dennis

  22. L_Jacobs si-vs1245.com says:

    Ajay
    I’m not a developer and I need an expert with BlogEngine.net to help me get this blog integrated into my aspdotnetstorefront website. You are the expert I’ve been looking for. Are you able to provide hands on development work for my site.
    I hope the answer is YES!!!
    :-)

  23. Hi Ajay,

    I have gone through each and every step which u have given in the post. The thing is i successfully integrated the BE in my application. It is quite gd that it is running. After some days (2 Weeks) server went down and came back, from that day my blog is not working. The pages in the my blog are coming and even though i am able to browse my application pages. Can u help me in solving this issue. I tried everything but not worked. Due to this the site is down till now.

    Regards,
    Chary.

  24. Hi Ajay,
    Thanks for this, it was a great help. But I have one problem, everything in my admin panel broke after I put the blog in a subfolder.

    I checked my Virtual Path in the web.config, but it’s right and the “public” part of the blogg works.

    Can you help me find the problem?

  25. Ivan says:

    Hi Ajay,
    I have gone through each and every step in the post. I get this message:
    Parser Error Message: Unrecognized configuration section BlogEngine.

    Source Error:

    Line 19:
    Line 20:
    Line 21:
    Line 22:
    Line 23:

  26. Ajay Matharu says:

    @Johanna – admin broke, as in, what happen to it?

    @Ivan – this is because you are missing reference to BlogEngine.Core.dll file in your application

  27. Ivan says:

    Hi Ajay,
    my problem is Unrecognized configuration section BlogEngine. I have error in the line where copy code from step 2.
    What’s happened ?
    Thanks

  28. Premium Wordpress Themes premiumthemes.net says:

    Thanks…..!

  29. Joshua alpineproducts.com says:

    Hello, what if I want to use the user/role provider provided with the root application instead of the ones provided by BE.

    Many Thanks

  30. MSUNNY none says:

    this is the error im getting on live site i had followed all the instructions but still its coming on live but it runs fine on localhost..plz help so

    Server Error in ‘/beta/blog’ Application.

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0103: The name ‘ExtensionManager’ does not exist in the current context

    Source Error:

    Line 53: foreach (SortedExtension x in sortedExtensions)
    Line 54: {
    Line 55: if (ExtensionManager.ExtensionEnabled(x.Name))
    Line 56: {
    Line 57: a.CreateInstance(x.Type);

    • Ajay Matharu ajaymatharu.com says:

      @MSunny – Are you still getting the error? This error is because the application is not able to find the “ExtensionManager” class. Check the references that are added correctly.

  31. Tor neolengob.com says:

    Great articles & Nice a site

  32. SamnPains ezinearticles.com says:

    I’d like to ask if someone has looked at this blog success review? people have said good things about the place, but it doesn’t seem to be that well known?

    The person who is doing the review is also offering a blog success bonus that seems fairly decent. Can anyone here tell me if it’s worth it?

    I’d love to make money online from writing a blog – it seems like the right thing to do for my talents…

  33. Premium Wordpress Themes premiumthemes.net says:

    Thanks for this information
    it will be very helpful

  34. May ucrystal.com says:

    It is very good piece of the infomation. I have vb.net app. The issue I have is that I can not put the folders under app_code in BE into my exiting site app_code folder since BE uses C#, they can not compile C# and VB at the same time in app_code folder. I am stucked. Do you have any idea or suggestions?

  35. WP Themes genericwpthemes.com says:

    I deliberate on the dispatch is gifted and on the point. This enter extraordinarily helped me in my assignment.

  36. Umesh Rakhe says:

    Hi Ajay Matharu
    I have followed all your instruction but now get the following error in few pages i have tried to solve but still no luck if you have any idea please tell me

    “Error 23 The type or namespace name ‘WidgetEditBase’ could not be found (are you missing a using directive or an assembly reference?)”

    Thanking You in advance

  37. sikat ang pinoy telebisyonserye.info says:

    I like blogengine.net powered by asp.net because this is the free technology that i can create modern website for my personal use or for business use. I would like to thank you for sharing your thoughts and time into the stuff you post!! Thumbs up!

  38. sikat ang pinoy telebisyonserye.info says:

    blogging with blogengine is great it easy to promote on search engines and it generate traffic in a short period of time.

  39. Wilbur says:

    Hello Ajay,

    Thank you for this excellent post. Before I implement it (reinstall BlogEngine.NET on my site) I have a few things I was wondering about. If you can answer any of them I would really appreciate it!

    I have successfully installed BlogEngine.Net 1.5 (web version) onto my site in the /blog subfolder.

    1) When a list of posts appears on a page such as blog/BlogEngine.Web/category/mycategory.aspx the title of each post gets an tag. I believe this is bad SEO practice, isn’t it? I thought there should be only 1 tag for a page. I would like to simply add the category name as the tag for the entire page, and make the titles of the posts tags. How would I go about doing this?

    2) Are my modifications/customizations restricted b/c I used the web version? I would think that I’d want to use the source code version for customizations, but I read on the BlogEngine documentation: “Source Code: This is the developer option. If you are interested is seeing how things work or want to add to the functionality, this is your option. Note that although you can look at the source with Visual Studio 2005 Express, you can’t rebuild the DLL with it.” I can’t rebuild the dll? Btw I had some luck changing postlist.ascx.cs and postview.ascx files without rebuilding/recompiling anything. And that was using the web version!

    3) For mazimum seo, shouldn’t keywords that appear in the blog entries hyperlink back to pages on the main web site? For example, if my business is about dogs, and I have “dogs” all over the main web site, and I even have a page “dogs.aspx”, shouldn’t my blog entries hyperlink back to the main site’s dogs.aspx page?

    4) Optional question: where would I look in the BlogEngine code to understand how pages are built dynamically? Isn’t there a page handler that fulfills the requests for pages such as BlogEngine.Web/Category/Dogs and BlogEngine.Web/2010/2, etc.?

    Thanks in advance,

    Will

  40. Orion SEO orionseo.com says:

    This one is very helpful, and integrating blog engine could be a very helpful if you done is successfully then you would definitely made yourself happy.

  41. web design renantech.com says:

    Blog Engine I think the best engine for create a blog. but we can comparation with other CMS.
    thanks.

Leave a Reply