Convert BlogEngine.Net to WAP

Download BlogEngine.NET WAP Projects (4.93 mb)

I have been using custom version of BlogEngine 1.5 for quite some time. I have made some customized additions to this engine to include features that I thought I were missing or I needed for my needs. Here are some of the changes that I worked on in the past.

  • Keep track of number of views of pages or posts
  • Add FaceBook like button
  • Add Recent Page List widget
  • .... and more

BlongEngine2.0 has been quite for some, so this is time for me to upgrade to latest and greatest code base. First step in my upgrade path is to convert the downloaded Web Site Project to Web Application Project (WAP) model. There is some discussion on BlogEngine.Net forums about it and there is a Fork for WAP conversion as well. I tried that WAP Fork but it drove me nuts. It has some issues.

  • It has some code that uses some Core features that do not exist in main branch of BlonEngine.Core project.
  • The current version of BlogEngine.Core in source control also does work with this WAP fork.

Well if you are not looking into making any changes to core then you can get the Fork because it has a compiled version of Core that probably works with this conversion.

Since I have to modify the Core to merge changes from older version of core so I had no option to go with my own conversion to WAP model. Ben has done good job of explaining steps on how to convert the source to WAP. But I found some of the steps out of sequence. That caused "Convert to Web Application" process in Visual Studio to leave some designer files in a state that would not compile. Also his steps suggested lot of renaming of controls etc. I did not find it necessary. Two main things that you will have to keep in mind.

  • Renaming of App_Code folder to something different. I just renamed it to AppCode.
  • This is from Ben's post: In the web.config file, in the <pages> section, there's this line:

    <add namespace="App_Code.Controls" tagPrefix="blog"/>

    Change that to:

    <add assembly="BeWap" namespace="Controls" tagPrefix="blog"/>

    In my case I kept assembly name same as BlongEngine.Net. This step is very important before you goto using "Convert To WebApplication" option. Otherwise you are looking at doing conversion again.

  • Rest you can follow Ben's comments.

For your convenience I have attached my conversion of BlogEngine.Net 2.0 to WAP with this post. If you have any questions, please feel free to contact. I am working on adding some new features to this newer version.

Search

Social

Weather

1.0 °C / 33.7 °F

weather conditions Clear

Monthly Posts

Blog Tags