Blogengine 1.5 is successfully upgraded to blogengine 2.0

Source: Internet
Author: User
Tags blogengine

It takes two years to use the blogengine. Net Blog system. The latest official version has reached 2.5. But it is based on. net4.0. In other words, the server must be installed with. net4.0, And the runtime environment must be set to 4.0. For the sake of portability. I have decided to upgrade my blog to 2.0. Blogengine. net2.0 continues with. net2.0. Although. Net 3.5 must be installed, the runtime environment is still 2.0.

Because blogengine. NET is an English version and is not enough for localization, I chose Boyi www.blogyi.net as my blog a long time ago.Program. You can download the latest version http://www.blogyi.net/download/from the official site of Boyi /. Here is the version of Boyi and blogengine.net compared with http://www.blogyi.net/download/release-mapping /.

I used Boyi 1.9, which corresponds to blogengine. net 1.5.

In fact, the upgrade is very simple, the method is as follows:

1. log on to the background of the old version of the blog and export blogml. XML (Backup). After all, there is no conversion between different blog programs, so it is relatively simple to export the backup file. Waiting for use.

2. Back up the file folder under the app_data directory of the old blog version. This folder is used to store blog images and files. Of course, it is best to back up the entire app_data directory. If the upgrade fails, it can be restored.

3. Back up the entire old blog (not required, but not in case ).

4. Download Bo Yi blog http://www.blogyi.net/download/ first downloadBlogyi. Net V2.0 source code compressed package File 5, 992kb,Blogyi. Net V2.0 source code compressed package File 5, 992kb (source code is not required, I will mention why to download the source code later)

5. Upload the blogyi. net2.0 program. You can enter the website to run the program after the upload.

6. Restore the data, log on to the background of the new blog, and choose Settings> Import & Export to import the previously backed up blogml. xml file. If it succeeds, your blog will be upgraded.

However, although the upgrade has been completed, the problem is not small. If you pay attention to it, you will find thatArticleThe display address of is changed. In the old version of the blog, the default naming blog article address is domain name + time date + article title urlencode encoding +. aspx, the new version uses domain name + time date + htmlencode + of the article title. aspx. This seems to be a small problem, but it will greatly reduce the access to your blog. Why? Most of the blog traffic comes from the search engine. The search engine stores the blog link address, which has changed, you cannot use the address originally stored by the search engine. Previous articles have become empty addresses. How can this problem be solved? This requires the source code of the blog.

The method is as follows:

1. Open the project source code with vs2010 and find blogyi. Net-2.0-source \ blogengine \ dotnetslave. businesslogic \ utils. CS

Find

 

 
Public static string removeillegalcharacters (string text) {If (string. isnullorempty (text) return text; text = text. replace (":", String. empty); text = text. replace ("/", String. empty); text = text. replace ("? ", String. empty); text = text. replace ("#", String. empty); text = text. replace ("[", String. empty); text = text. replace ("]", String. empty); text = text. replace ("@", String. empty); text = text. replace ("*", String. empty); text = text. replace (". ", String. empty); text = text. replace (",", String. empty); text = text. replace ("\" ", String. empty); text = text. replace ("&", String. empty); text = text. replace ("'", String. empty); text = text. replace ("", "-"); text = removediacritics (text); text = removeextrahyphen (text); Return httputility. htmlencode (text)
 
. Replace ("%", String. Empty );}

Set

Return httputility. htmlencode (text). Replace ("%", String. Empty );

Change

 
Return httputility. urlencode (text). Replace ("%", String. Empty );

Then re-compile the blogengine. Core Project and upload and replace blogengine. Core. dll.

This solves the problem of changing the URL of the blog post after the upgrade.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.