none
ASMX webservice over GPRS

    Dotaz

  • Hi

    I have a WM 6.5 app that is calling a ASMX webservice.

    It's declared like this:

            [WebMethod]
            public int TestUpload(byte[] data)
            {
                return data.Length;
            }

    My problem is, when length of the data goes beyond 756 bytes, the call hangs for about 130 sec before throwing me an exception:

    System.Net.WebException: Unable to read data from the transport connection. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host in System.Net.Sockets.Socket.ReceiveNoCheck(Byte[] buffer, Int32 index, Int32 request, SocketFlags socketFlags) .....

    I have tried, without any effect, to set the MTU to a low value (1300 and 500) and set EnablePMTUDiscovery to 0 pointed out in this article: http://social.msdn.microsoft.com/Forums/en/netfxcompact/thread/b0f90f2c-cb07-455d-a740-f34bb66a3912

    The server is not under my control and I cannot add any registry entries or run sniffing programs on it.

    It will run just fine when I'm cradled using ActiveSync or using WLAN and I can send 10000 bytes in 2 secs, but by using GPRS, a limit somewhere says that i cannot send more than 756 bytes to the webservice. I tried to google on that specific number believing it was a common packet size limit or some sort but could not find anything.

    What can be causing this behavior?

    Grateful for any help, I've been looking at this for 12 hours now.

    Best Regards

    Raymond

    16. února 2012 22:30

Všechny reakce