Place this xml in the application configuration file.

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