Windows Live Writer Error: blogger.getUsersBlogs method received from the weblog server was invalid

This was really irritating me today. I set up a new WordPress installation (more on that another day), tweaked it up a little bit, and then couldn’t get it working with Windows Live Writer, which is my blogging tool at the moment. (It really is one of the better Microsoft products).

So I go through the add new blog wizard, and then I get this obnoxious error:

So irritating! Naturally I googled, and came across a solution. All I had to do was add these lines to my .htaccess file:

<Files xmlrpc.php>
SecFilterInheritance Off
</Files>

But that didn’t solve the problem. It actually made it worse…. now I was getting an apache error even getting to the blog page through a browser.

After doing some Http proxy snooping using Fiddler, I figured out that the error was this:

Warning: Cannot modify header information – headers already sent by (output started at /home/testdomain.com/html/wp-content/plugins/recent-posts.php:2)

Ah! Now we are getting somewhere. When I opened up the offending plugin file, I found blank lines at the top and bottom before the <? , which is what caused the whole problem… the xmlrpc.php in WordPress couldn’t change the headers because the blank lines had already been sent down to the client. This then caused the XML to be invalid, which gave me that error.

2 Responses to “Windows Live Writer Error: blogger.getUsersBlogs method received from the weblog server was invalid”

  1. Dale Says:

    I am having problems with Live Writer and my WordPress since upgrading to 2.1

    I also have a problem with my RSS feed, as it has a blank line at the top of it, making it invalid. Seems related to what you said here. What did you do to fix it?
    email if you can.

    Thanks,
    Dale

  2. Rama Says:

    This problem of NEWLINES is very prevalent in WP2.1.

    Check out this link for fixing it – http://kannan.jumbledthoughts.com/index.php/windows-live-writer-problems-with-wordpress-how-to-fix/