none
Proxy server issue? The response did not contain an end of entity mark.

    Question

  •  

    I have an application developed on the .NET Compact Framework 2.0.  The application communicates with a web service to upload and download information.  It has been working well until recently at one customer site.  The customer's mobile devices CAN connect to a web service on an external service if they try external to their proxy server; however, when they try to go through their proxy, it does not work.  Specifically, I am getting an error message back saying: 'The response did not contain an end of entity mark.'

     

    I think the issue has to do with the dataset being returned to the mobile device from the web service.  Other web traffic goes through and I can connect to the web service main asmx page through Internet Explorer.  So, I think the issue is that I can not get the data back from the web service.

     

    I was under the impression that the 2.0 framework should take care of proxy server issues.  I apparently took that too generally.  We tried running the application with specific proxy settings, but that did not change the error message at all.  Can someone tell me what is going on?  More importantly, how might I resolve this error?

    Thursday, November 01, 2007 7:58 PM

Answers

  • Hi folks,

     

    I wonder if there is a sample service/proxy that you may share with me to further investigate the issue? You can email the information to anthony.wong@microsoft.com. Information such as the web and proxy servers used would be helpful as well.

     

    Cheers,

    Anthony Wong [MSFT]

    Monday, November 19, 2007 8:49 PM

All replies

  • I am having the same problem. We have web services set up that are called from a pocket pc. Works fine with everything but we are setting up a new client and we suddenly get this problem. I'll be sure to post here if we come up with a solution.
    Wednesday, November 07, 2007 12:25 AM
  • Hi,

     

    I've hit the same problem today.  Would be good to know what this is as I need to use the customers proxy server.

     

    NozFx

    Friday, November 16, 2007 2:44 PM
  • Hi folks,

     

    I wonder if there is a sample service/proxy that you may share with me to further investigate the issue? You can email the information to anthony.wong@microsoft.com. Information such as the web and proxy servers used would be helpful as well.

     

    Cheers,

    Anthony Wong [MSFT]

    Monday, November 19, 2007 8:49 PM
  • I'm still unable to reproduce the issue in house, however the client is still experiencing it.

    I'm trying to get details for their setup and will update if possible.
    Monday, November 19, 2007 9:39 PM
  • Hi Anthony,

     

    Thanks for your reply.  Unfortunately been off sick today so haven't been able to talk with the customer.  I will get you the details of the proxy used as soon as I'm back in.  This error (for our app anyway) is intermittent, but the way I am using the Web requests may not help.  Our application has an AUTD feature that makes long lived web requests to the web server.  These requests can stay alive for upto 45 minutes, there is no data passed through the transport in between time.  Now this works fine until connected to the proxy, in which we sometimes see this exception.  The requests on testing (with this proxy) at present actually haven't been running long though.  I think the proxy is the culprit of the TCP session drops, so requests have not been lasting any more than two minutes anyway.  After a timeout the typical exception is "Data Cannot be Read from Transport Connection".  This is as expected but every so often (even within safe timeout) we get the "The response did not contain an end of entity mark."  We have only been testing using HTTPS over port 443 (SSL), I'm yet to try this with clear-text HTTP connection on port 80.

     

    Regards

     

    NozFx

    Tuesday, November 20, 2007 6:14 PM
  • Any updates on this? I've narrowed the problem down locally to the specific lines of code, but the soap exception is still being thrown.

    Any help would be appreciated.
    Wednesday, November 28, 2007 10:16 PM
  • Just thought I would post the code that fixed my issue.

    Inside the web service reference I added this code:

    Inside Reference.vb:

            Protected Overloads Overrides Function GetWebRequest(ByVal uri As Uri) As System.Net.WebRequest

                Dim request As System.Net.WebRequest = TryCast(MyBase.GetWebRequest(uri), System.Net.HttpWebRequest)

                If TypeOf request Is System.Net.HttpWebRequest Then
                    DirectCast(request, System.Net.HttpWebRequest).ProtocolVersion = System.Net.HttpVersion.Version10
                End If

                Return request
            End Function


    Friday, November 30, 2007 5:21 PM