So I recently encountered an error message I hadn't previously seen while developing with the IDK:
|
The server committed a protocol violation. Section=ResponseStatusLine
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine |
Fortunately this was an error that BEA was already familiar with, but I found their KB article (article link requires login) a bit short when it came to explaining how to fix the problem.
The workaround in the article states:
| "Change the default value of the ServicePointManager.Expect100Continue property to false. By default this value is set to true, which causes the undesired error “The server committed a protocol violation” in ResponseStatusLine."
|
The article then points to an MSDN blog post for more information.... great that's real helpful people. The MSDN blog post goes into rather good detail of "how" to replicate the issue, but just like the BEA article doesn't bother to give a usable example of how to fix the problem.
After a bit of time using Google (and a response to my post on BEA's forums) so far the best workaround I have found it to add these few lines of code to your web.config on your portlet server:
<system.net> <settings> <servicePointManager expect100Continue="false" /> </settings> </system.net>
Once I added that to my portlet server's web.config the protocol violation errors went away and for the most part I was back up and running. Of course, I'm still running into other instances of portlet code not working as expected under the new version (e.g. PTHTTPGETRequest JavaScript calls), but I'll post more on that later once I figure out the fix to the problem.
