[Elphel-support] Elphel / C#

shane.sanford at concurrent.us shane.sanford at concurrent.us
Tue Oct 2 19:23:04 PDT 2012


Thanks for the responses...

I did manage to fix the problem and thought I would report it here in case any one runs across it in the future.

The error seems to be using any .NET application in my case C#. Specifically when asking for the response from the camera 

System.Net.WebResponse _WebResponse = _HttpWebRequest.GetResponse();
the following error is thrown "The server committed a protocol violation. Section=ResponseStatusLine".
After doing some research and trying multiple solutions it appears .NET has extremely strict expectations on header responses from the camera (could be a extra or missing space or captilization etc...). The following solution relaxes .NET header requirement for server responses

If added to the app.config, it would be:
 1: <!-- after the applicationSettings --> 2: <system.net> 3: <settings> 4: <httpWebRequestuseUnsafeHeaderParsing="true"/> 5: </settings> 6: </system.net>
Now everything works as expected...



Shane

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20121003/59ab0e23/attachment-0002.html>


More information about the Support-list mailing list