Force BlogEngine.Net to update its cache after an import

May 9, 2008 07:48 by SamMcGeown

Well my first real post on BlogEngine.Net is...about BlogEngine.Net!

After running the import program from my old DotNetNuke blog I found that the importer had worked, but that the blog entries had not shown up. This was because the cache that BE.Net uses for the XML data files. Since I'm on a shared hosting I couldn't just run an IISReset.exe, so I obviously needed a work around, and here it is:

  1.  Open default.aspx.cs in Visual Studio (or just a text editor)
  2. Add the following to the Page_Load function:

    BlogEngine.Core.Post.Reload();

  3. Save and upload default.aspx.cs, refresh your blog.

Et voila, posts will appear. Phew.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: BlogEngine.NET | Blogging
Actions: E-mail | Permalink | Comments (3) | Comment RSSRSS comment feed

Related posts

Comments

June 27. 2008 11:11

Vince R

thanks much. this came in handy.

Vince R

July 7. 2008 13:02

Si

Awesome, I've been looking for a solution for a LONG time.

Si

July 14. 2008 08:35

SamMcGeown

My pleasure - it was a bit of a head scratcher for a while!

SamMcGeown

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

August 27. 2008 16:59