Fix Live Writer Protocol Violation Error CR Must Be Followed by LF



One of the most vexing problems I have encountered recently was when Live Writer was not able to open posts on DragonBlogger.com or even publish articles to the site.  Any attempt to contact my WordPress blog would reveal a popup that complained about The server committed a protocol violation.  Section=ResponseHeaderDetail=CR must be followed by LF.

image

This protocol violation was with Live Writer and this one WordPress blog, all my other blogs worked fine.  I investigated like crazy and the problem only started happening when I switched DragonBlogger.com to using Incapsula.  I even disabled WP Better Security to rule it out as a problem.

image

But, I found some solutions that applied to other .NET web applications that I was able to manually apply to Windows Live Writer and get it to work.

Steps to Fix Windows Live Writer Protocol Violation Problem

First make sure you closed Windows Live Writer, the program can’t be open.

image

Open your WindowsLiveWriter.exe.config (yeah it’s a .exe.config file) open it in a text editor.

The file starts with these lines:

<configuration>
<startup>
<supportedRuntime version=”v2.0.50727″/>
</startup>

You will want to add the following lines immediately under those lines:

<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing=”true” />
</settings>
</system.net>

Then save the file.

Note: If you run into problems saving the file because of permissions, you will need to right click on the file, click properties and allow all users to read/write to  the file, then modify the file and restore original permissions after you overwrite the file.

Start up Windows Live Writer, if it gives you problems double check the config file you may have broken the syntax or don’t have something copied correctly.  If it starts properly then go ahead and connect to your blog and your problems should be resolved I know mine were.

 

Update:  Okay I found out this fix does work for Writer 2012, I had to put the statement under the <configuration> tag instead of the <startup> tag however, so for Windows Live Writer 2012 you want it to look like this:

<configuration>
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing = “true”/>
</settings>
</system.net>

Update Dec 6th 2012

Note, if you put your blog behind the Incapsula web caching/proxy service it will block Live Writer without making this configuration change. I confirmed that using Incapsula is what caused Live Writer to stop working and making proper POST calls to the xmlrpc.php in WordPress.  Adding the parameter remediates this problem.

 

Justin Germino
Working in the IT Industry for over 17 years starting with OS, Networking and then moving into web based technologies including authentication and online security. Dragon Blogger has unique insights and opinions to how the internet and web technology works. An Avid movie fan, video game fan and fan of trying anything and everything new.
Justin Germino

@dragonblogger

Technology, Gaming and Wordpress blogger who runs gadget giveaways, helps others with blogging tips, monetization, earning and more!
The Best Fitness Tracker Under $50: https://t.co/xv5O12IFbd via @YouTube - 2 hours ago
Justin Germino
2012-12-06T05:36:41+00:00 December 3rd, 2012|Categories: blogging, Software|Tags: , , , , |