Error: "The server committed a protocol violation. Section=ResponseStatusLine"

O

oriol.ardevol

Hi,

I have an asp.net application that connects through an HttpWebRequest
object to a ISAPI dll in a server. This isapi dll has some different
method calls.

What I do is calling the different methods of the isapi with
HttpWebRequest with GET protocol like:

http://<server>/APIWeb/<isapi>.dll?<method>?<parameter1>=<parameter1_value>&<parameter2>=<parameter2_value>&...

The problem we have is that just for one of the methods of the isapi,
we get the "The server committed a protocol violation.
Section=ResponseStatusLine" exception. The rest of the method calls
work properly and don't fail.

I've tried to set the "AllowUnsafeHeaders" attribute in web.config
without any success.

Also, I've enabled logging for System.Net namespace and this are the
results for a successfull call:

System.Net Information: 0 : [5692] Associating HttpWebRequest#58011989
with ServicePoint#9886408
System.Net Information: 0 : [5692] Associating Connection#41013592
with HttpWebRequest#58011989
System.Net Information: 0 : [5692] Associating HttpWebRequest#58011989
with ConnectStream#18706858
System.Net Information: 0 : [5692] HttpWebRequest#58011989 - Request:
GET /APIWeb/apiweb.dll?API_GetInfoRegistros?PWIndice=1&PWNumero=1 HTTP/
1.1

System.Net Information: 0 : [5692] ConnectStream#18706858 - Sending
headers
{
User-Agent: Pixelware HTTP Sample
Pragma: no-cache
Host: <server_ip>
Connection: Close
}.
System.Net Information: 0 : [5692] Connection#41013592 - Received
status line: Version=1.0, StatusCode=200, StatusDescription=OK.
System.Net Information: 0 : [5692] Connection#41013592 - Received
headers
{
Server: Microsoft-IIS/6.0

And the log for the method that fails:

System.Net Information: 0 : [3704] Associating HttpWebRequest#3865173
with ServicePoint#9886408
System.Net Information: 0 : [3704] Associating Connection#34786562
with HttpWebRequest#3865173
System.Net Information: 0 : [3704] Associating HttpWebRequest#3865173
with ConnectStream#44643603
System.Net Information: 0 : [3704] HttpWebRequest#3865173 - Request:
GET /apiweb/apiweb.dll?API_GetInfoTareas?PWIdWF=000000000013 HTTP/1.1

System.Net Information: 0 : [3704] ConnectStream#44643603 - Sending
headers
{
User-Agent: Pixelware HTTP Sample
Pragma: no-cache
Host: <server_ip>
Connection: Close
}.
System.Net Error: 0 : [3704] Exception in the HttpWebRequest#3865173::
- The server committed a protocol violation.
Section=ResponseStatusLine
System.Net Error: 0 : [3704] Exception in the
HttpWebRequest#3865173::EndGetResponse - The server committed a
protocol violation. Section=ResponseStatusLine


Any help will be appreciated, thanks in advance,
ori
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top