Click here to Skip to main content
15,891,906 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi I have a WCF service on my company server.
I works well for all clients.But one of our client cannot connect to the service. When the client tries to connect the message
XML
There is a problem with the XML that was received from the network. See inner exception for more details

returns.
I used Fiddler to investigate the HTTP messages that exchange. When I connect from my own system to the service the HTTP response captured by Fiddler is
XML
HTTP/1.1 200 OK
Date: Sun, 03 Feb 2013 10:23:57 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
Content-Length: 376
Cache-Control: private
Content-Type: text/xml; charset=utf-8

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><InvokeMainServiceResponse xmlns="http://tempuri.org/"><InvokeMainServiceResult>00A000620B6A60643C40669460B4002055C0686071270476002A3223030BD67400606662326627040007E00024D0206D320C96264061BA6702766402206F24443002600860076D041807</InvokeMainServiceResult></InvokeMainServiceResponse></s:Body></s:Envelope>


which is correct but when I connect from the client the response is
XML
HTTP/1.0 200 OK
Date: Sun, 03 Feb 2013 09:54:58 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
Content-Length: 376
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Connection: keep-alive

private
Content-Type: text/xml; charset=utf-8

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><InvokeMainServiceResponse xmlns="http://tempuri.org/"><InvokeMainServiceResult>00A000620B6A60643C40669460B4002055C0686071270476002A3223030BD67400606662326627040007E00024D0206D320C96264061BA6702766402206F24443002600860076D041807</InvokeMainServiceResult>


and the following two extra lines
XML
private
Content-Type: text/xml; charset=utf-8


cause the client program not to be able to extract the XML from the HTTP response.
I cannot figure out where those lines come from. Your help is really needed.
Thanks.
Posted
Comments
Sergey Alexandrovich Kryukov 3-Feb-13 14:26pm    
OK, did you see this inner exception as instructed?
—SA

1 solution

Actually there are three extra lines - one blank. That line is probably what causes the failure.

However the http response is ill-formed. Something up stream is probably incorrectly using a buffer and consequently you get part of a http header inserted. So first step would be to figure out the servers that are between the client that fails and the actual server.

You should also try looking for other test clients besides just your box. If the failing client is outside your network then look for another different client box that is outside your network and test with that.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900