通过GPRS的ASMX网络服务

通过GPRS的ASMX网络服务

本文介绍了通过GPRS的ASMX网络服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

您好



我有一个WM 6.5应用程序正在调用ASMX Web服务。


声明如下:

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

我的问题是,当数据长度超过756字节时,呼叫会挂起约130秒,然后再抛出异常:


System.Net.WebException:无法从传输连接中读取数据。 ---> System.Net.Sockets.SocketException:System.Net.Sockets.Socket.ReceiveNoCheck(Byte []缓冲区,Int32索引,
Int32请求,SocketFlags socketFlags)中的远程主机强制关闭现有连接... ..


我尝试过,没有任何效果,将MTU设置为较低的值(1300和500),并将本文中指出的EnablePMTUDiscovery设置为0:


服务器不受我的控制,我无法添加任何注册表项或在它上面运行嗅探程序。


当我使用ActiveSync或使用WLAN时,它会运行得很好,我可以在2秒内发送10000个字节,但是通过使用GPRS,限制在某个地方说我不能向网络服务发送超过756个字节。我试图在特定号码上谷歌相信
这是一个常见的数据包大小限制或某种类型但是找不到任何东西。


可能导致这种行为的原因是什么?


感谢任何帮助,我现在已经看了12个小时。



Best问候


Raymond


解决方案

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

解决方案


这篇关于通过GPRS的ASMX网络服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 23:55