Windows Live Writer and 403 Forbidden error

Uncategorized | Sunday 24 June 2007 11:41 pm

At any given time, I have at least 2 blog posts in draft form that I’m waiting to put the finishing touches on before publishing. I wasn’t originally a fan of using a rich blog client since I always wanted to roam the drafts and work on them from whatever computer I happen to be at. When Windows Live Writer (WLW) was first released, like a good Microsoft cog, I jumped on it to give it a try. Truthfully, I already had a huge bias against it due to my love for the roaming drafts.

 

However, to my surprise, I really, really liked Windows Live Writer. It made many of the tasks I struggle with regularly in authoring my posts, like embedding images that aren’t already remotely hosted. Windows Live Writer allowed me to author my posts very intuitively by enabling me to insert local images while I’m writing, and uploading them after I elect to publish the post. The post is then modified to have the image reference the new remote location.

 

Ever since falling in love with WLW, I was hoping they would release an update to fix some bugs I noticed as well as add new features. My wish came true on May 30th when The WLW team announced v2 was available for immediate download.

 

After eagerly downloading and installing it, I ran into a huge problem — I couldn’t even connect to my blog. I kept getting an obscure errror message that claimed I was getting a 403 Forbidden HTTP status code from the XML-RPC interface. I was able to hit the file directly without any trouble and verified that the file permissions were indeed correct. I was stumped. I did a web search and surprisingly I couldn’t find any information on it.

 

I emailed the Program Manager who works on the WLW team (perks of working at Microsoft I guess), and after a few emails, I was told to check if I had the Bad Behavior plugin installed (I do). It seems there is a bug in WLW v2 that makes it incompatible with that plugin.

 

The problem is documented by James McKay, who has a very simple fix. You just have to change the msie.inc.php file for the Bad Behavior plugin from this:

if (!array_key_exists('Accept', $package['headers_mixed'])) {
   return "17566707";
} 

to this:

if (strpos($package['headers_mixed']['User-Agent'], "Windows Live Writer")

    === FALSE && !array_key_exists('Accept', $package['headers_mixed'])) {

return "17566707";

}

After making this quick and painless change, WLW works now with my blog once again. Yipee!

Tags: , ,

4 Comments »

  1. Comment by Joe Perrin — June 26, 2007 @ 9:52 pm

    Thank you for this. I had the same problem and this provided the resolution. I am one happy camper.

  2. Comment by Mike Torres — July 5, 2007 @ 9:17 am

    Of course, Writer also lets you roam drafts now! I don’t actually know if it works with WP but it does with Spaces.

  3. Pingback by Windows Live Writer and Wordpress 403 Error 2 | Lorgor — July 5, 2007 @ 5:17 pm

    [...] 2 and Wordpress 403 error, recommending to distable Bad behavior plugin. I found new solution from Travin’s blog. To solve this problem (before the new release of WL Writer) you need to modify msie.inc.php of Bad [...]

  4. Comment by Petar Smilajkov — July 26, 2007 @ 6:20 pm

    Thank you!!! I’ve been looking around for this for some time now :)

    Petar

RSS feed for comments on this post. TrackBack URI

Leave a comment