Finally, Mr. Loker is Twitter-ized as well

February 27, 2009 at 9:15 AMAndre Loker

Yeah, I’m late – anyway, I’ve signed up with Twitter.

If you hurry you can be my first follower! (No prices to win, though)

Posted in: Meta


Windows Live Writer overwriting uploaded files

February 13, 2009 at 10:52 PMAndre Loker

Weird, I didn’t notice it for quite some time. It seems that since version 2009 Windows Live Writer has changed they that uploaded (images etc) files are called. If you look at older posts you’ll see that the images were uploaded to /WindowsLiveWriter/{article name}_{some number}/image_{some number}.png the data folder of my blog. It seems that some smart guy decided to change this behaviour to something short as /{filename}. The blog overwrites this file if it exists so if you were to use the same file name in multiple articles you’d happily overwrite the older version with the new one.

This becomes even more unpleasant if you keep in mind that images that are pasted from the clipboard into WLW will all have the name “image.png”. Guess what: if you publish an article with multiple images pasted from the clipboard you’ll end up with all images being the same.

I hope that this is just some hidden setting in WLW, but until now I couldn’t find it.

Now, actually I did find something. After some time of searching I found a comment in another blog that at least provided an initial hint of how to work on this problem. You can change the format of uploaded file names with a registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows Live\Writer\Weblogs\(BLOGID)\UserOptionOverrides

where (BLOGID) is different for each blog registered in WLW. Within that key create a string value name fileUploadNameFormat and assign it a string representing the format of the uploaded files, for example WindowsLiveWriter/{PostTitle}_{PostRandomizer}/{FileName}. At least now we have a distinct subfolder per article again. Anyway, still no fancy auto numbering of the images, therefore the problem with multiple pasted images won’t be solved with this registry entry.

Because I don’t have any desire to lose uploaded files I chose for a more conventional solution: I modified the blog software to never overwrite uploaded files. If a file name collision is encountered the file is moved into a subfolder named after some GUID.

It has the drawback that changing an image from within WLW will always cause a new file to be added to the server (instead of replacing the old one). Anyway, I prefer a few more files on the server over overridden files.

Nevertheless I find it a bit weird that I haven’t read much about this issue yet. Maybe it really is only me using some wrong settings?

Posted in: Meta

Tags: ,

Still alive

December 3, 2008 at 7:46 PMAndre Loker

Yeah, it has been quite a while since my last post. Bear with me, I'm having a busy time right know. Expect some fresh content any time soon.

By the way: I appreciate your feedback like blog post comments etc. But please don't abuse the commenting function for stuff like SEO ranking competitions. I'll remove the links anyway, so save your (and my!) time.  Problem solved: I have modified the blog to simply reject those comments.

Posted in: Meta | Off topic


Upgrading BlogEngine.NET from 1.4 to 1.4.5.x

September 3, 2008 at 8:31 PMAndre Loker

About two month ago I wrote about small issues I faced when I upgraded from BlogEngine.NET 1.3.1 to version 1.4. Today I updated my blog software again, this time to the trunk version of BlogEngine.NET. Almost everything went smoothly there were a few glitches I had to fix before I was satisfied with the results.

Here are the most important points: 

  • First of all, the issues with the strange author name in the RSS feed ( has been taken care of in version Nice! Note that the official 1.4.5 release from august 1st does not yet fix the issue. You'll need a revision 16044 or higher.
  • The strange e-mail fields (second point in my first post) are not really fixed - as far as "fixed" is the correct term - according to Mads Kristensen this was attentional. Mads has changed the behaviour a bit, however to the worse if you ask me. As mentioned in my first post if someone contacts you with the contact form you'd get an e-mail with your name and your email address as the "From" field. "Sender" and "Reply-To" headers are added which include the author's name and e-mail address. I mentioned some issues that are caused by this, for example that Thunderbird uses the "From" field when quoting a mail ("Andre Loker wrote:")
    Now it has changed slightly: the "From" field contains the name of the mail's author but the e-mail address of your blog. While this fixes the issue when quoting the mail it causes a worse issue: if you try to add the author to your address book, chances are that your mail application uses the author's name but your e-mail address. I created an issue for this bug - at least I think it should be considered a bug.
    To sanitize the situation I modified the code to create one reasonable "from" header and don't add any further headers to the mail:
       1: // Contact.aspx.cs - replace this:
       2: mail.From = new MailAddress(BlogSettings.Instance.Email, name);
       3: mail.ReplyTo = new MailAddress(email, name);
       4: mail.Sender = mail.ReplyTo;
       6: // with:
       7: mail.From = new MailAddress(email, name);
  • The current version of the contact form behaves a bit odd or doesn't work at all if attachments are disabled in the contact form, as it is in my blog. The issue is known, so we can expect a fix in the future. As a preliminary fix you can change contact.aspx like this:
       1: // line 48ff:
       2: // replace:
       3: if ($('<%=txtAttachment.ClientID%>').value.length > 0)
       4:   return true;
       6: //with
       7: <% if(BlogSettings.Instance.EnableContactAttachments) {%>
       8: if ($('<%=txtAttachment.ClientID%>').value.length > 0)
       9:   return true;
      10: <%}%>

Aside from these issues the people behind BlogEngine.NET have done a great task to improve their product.  I wholeheartedly recommend it to anyone asking for .NET based blogging software.

Posted in: ASP.NET | Meta

Tags: ,

Things to note when upgrading to BlogEngine.NET 1.4

July 9, 2008 at 11:07 AMAndre Loker

Several days ago I upgraded the blog software (BlogEngine.NET) from version 1.3.1 to 1.4. Here are some changes that sneaked in to the new version:

  • The RSS feed generator creates a different value for the <author> element. In version 1.3.1 it was simply the blog owner's name (here: Andre Loker), in version 1.4 the name is composed of a "anti-spammified" version of the blog owner's email address and his name (here: <Andre Loker>). I don't like it, so I reverted it to the original behaviour:
    • Locate BlogEngine.Core\SyndicationGenerator.cs (in the source package)
    • Comment out line 554 (prefixed by "Was" in the picture)
    • Add the line prefixed by "Now" in the picture
  • When you receive a mail that was sent via the contact form, the "From" field is filled with the e-mail address and name of the blog owner, a "Sender" field is added that contains the mail author's name and e-mail address. In my mail client, all mails coming from the contact form now have "Andre Loker" in the sender column. Again, I reverted this to the original behaviour:
    • Locate contact.aspx.cs
    • Comment out the line prefixed by "Was" in the picture
    • Add the line prefixed by "Became" in the picture
  • To be continued...

Note: Remember to apply the Memory leak fix for version 1.3, 1.3.1 and 1.4

Posted in: Meta