Changing Microsoft CRM Dynamics 4.0 Encoding
Recently I worked on a project involving Microsoft CRM Dynamics 4.0 and because the application was in french we decided to change the encoding from UTF-8 to ISO-8859-1 which is quite simple to do but we ended up with a lot of problems...
If you change the encoding of the CRM in the web.config (globalization tag), CRM will then start to show you weird things (horrible characters) instead of accents. The reason is simple, if you convert a text (containing accents) from an encoding like ISO-8859-1 (or Windows-1252) to URF-8 all the accents will be replaced with fucked up characters, leaving normal non-accentuated characters intact.
I discovered that CRM seems to have parts that are always running under UTF-8 instead of following the encoding in the web.config file, so this cause a constant-encoding-converting-glitch. I did not found a solution to solve those CRM glitches so I decided to come back to default CRM encoding: UTF-8.
Beeing in UTF-8 causes convertion problems to the files I add to the CRM (.js - JavaScript). Because my files I create are in Windows-1252 (default), when CRM flush them to the client, they get "converted" and so the accents are beeing mashed up, this causing IE to not load those .js files. The only solution for this is to manualy change the encoding of the .js files to UTF-8 so that they don't get converted automatically.
Conclusion
Never change the CRM encoding; let it to UTF-8 and adapt your stuff.
Solution for "The server committed a protocol violation: Section=ResponseStatusLine"
If you get an error like "The server committed a protocol violation", you may have some of the following problem (which can be solved by one of the provided solution as well).
Unsafe header parsing
Unsafe header parsing is an option you can turn on on your ASP.Net website (in the web.config) to allow the framework to parse responses. But what is an unsafe header ? It is a header in which the keys contains one or more spaces (that is not allowed in the HTTP 1.1 specifications).
The common case is having a space in the "content-length" header key. The server actually returns a "content length" key, which, assuming no spaces are allowed, is considered as an attack vector (HTTP response split attack), thus, triggering a "HTTP protocol violation error" exception.
To allow the parsing of unsafe headers, add the following to your web.config :
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
You forgot to allow HttpGet and/or HttpPost on your web.config
If you call a WebService, you must accept the HttpGet and/or HttpPost protocols in your web.config (they are disabled by default).
So add the following to your web.config file :
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>
</configuration>
You're using Skype
If you use Skype, make sure to uncheck the option for using port 80 and 443.
None of the above: find it yourself
If this has not helped, use the following links to help you find the answer :
Configure network tracing : http://msdn2.microsoft.com/en-us/library/ty48b824.aspx
Interpreting a network trace : http://msdn2.microsoft.com/en-us/library/46fcs6sz.aspx