Troubleshooting Proxy Errors

N

Nathan

How does one go about troubleshooting problems with WebRequest and
prooxy servers?

WebRequest.GetResponse is returning WebException with message: The
response did not contain an end of entity mark.

This only happens with one customer when he uses the Pocket PC at work.
Pocket Internet Explorer works under the same circumstances and shows a
valid plain text response. My .NET CF program gets the above error.

Under both scenarios, the server log shows that everything happened
correctly on the server and it returned a valid response. The only
difference in the request, that I can see, is that the User Agent is
"-" instead of "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC;
240x320)". The response is not different.

It appears that the proxy, or some other entity is modifying the
response or returning an error. The customer does not have personal
firewall software but there certainly could be a corporate firewall.

How do I go about finding out why this happens? Is it a lost cause if I
don't have access to the proxy server?

And will putting something different in the User Agent header make any
difference?

Thanks for any ideas.

Nathan
 
S

Simon Hart

I take it you are using ASP.NET Web Services? This sounds like the returning
SOAP is becomming corrupt. Use a tool such as Web Service Studio to examine
the returing SOAP or write a SoapHeader to log the SOAP packets.

Simon.
 
N

Nathan

Simon said:
I take it you are using ASP.NET Web Services? This sounds like the returning
SOAP is becomming corrupt. Use a tool such as Web Service Studio to examine
the returing SOAP or write a SoapHeader to log the SOAP packets.

No, not quite that complicated. Web services are working just fine
under the same conditions. The Url is to a PHP page that serves a plain
text page. I am using a simple HttpWebRequest and HttpWebResponse to
get that text.

All I could get back:

ServerProtocolViolation: The server response was not a valid HTTP
response.
The response did not contain an end of entity mark.

WebException.Response was null, so no additional information is
available.

It would appear that the proxy server is corrupting the HTTP headers,
or adding additional ones that .NET CF 1 doesn't understand, or
returning complete garbage.

I've asked if I can get Proxy server logs. I don't see that I will be
able to figure this out without them.

If I had to guess, it is some security setting that trusts browsers but
not other, unknown programs to get data from outside the firewall.

Nathan
 

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