Comments Import

Jun 11, 2008 at 3:11 AM
I've been in the process of changing my web site from my "home grown" blogging software to BlogEngine.NET.  I have been able to get the articles onto the web site by copying and pasting the title, date, and content without any problems. 

Now I am going back and trying to add comments to each of the /posts/{GUID}.xml files by having my comments formatted into the XML.  However, when I upload this to the site, it does not appear to pick up the comments in the post.

Here is a sample of the XML in question (email and ip have been changed).  The first comment is something that my comment export routine created.  The second comment was generated by BlogEngine.NET.  Am I missing something?  Do I need to update another file or something?  Thanks in advance!

  <comments>
    <comment id="9fd9f3f0-960b-41d2-9faf-dd564571c602" approved="True">
      <date>2004-11-13 00:27:00</date>
      <author>Sean</author>
      <email>nospam@gmail.com</email>
      <country>us</country>
      <ip>76.19.1.1</ip>
      <website>http://proudgeekdad.com</website>
      <content>This is just a test.</content>
    </comment>
    <comment id="baaec59b-5f01-4efb-a292-6a7ae80154e6" approved="True">
      <date>2008-06-10 21:30:50</date>
      <author>Sean</author>
      <email>nospam@gmail.com</email>
      <country>us</country>
      <ip>76.19.1.1</ip>
      <website>http://www.proudgeekdad.com/</website>
      <content>Test Comment 2</content>
    </comment>
  </comments>
Jun 11, 2008 at 10:28 PM
It should work fine. Just remember when you update XML post files, it won't be automatically reflected to your blog, because BlogEngine.NET has cached the XML when the application starts. You have to restart the application domain to flush the cache, by doing IIS reset, or edit your web.config file.

Regards,
Agus Suhanto
Jun 12, 2008 at 1:33 AM
Agus, thanks for the quick reply. I hadn't realized that the XML files were cached, but that makes sense.  I restarted the site and it has imported the comments correctly.  Thanks again for your help!

-Sean

suhanto wrote:
It should work fine. Just remember when you update XML post files, it won't be automatically reflected to your blog, because BlogEngine.NET has cached the XML when the application starts. You have to restart the application domain to flush the cache, by doing IIS reset, or edit your web.config file.

Regards,
Agus Suhanto