通过GPRS的ASMX网络服务 [英] ASMX webservice over GPRS

查看:79
本文介绍了通过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:

http://social.msdn.microsoft .com /论坛/ en / netfxcompact / thread / b0f90f2c-cb07-455d-a740-f34bb66a3912


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


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


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


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



Best问候


Raymond


解决方案


由于您可以通过WLAN发送数据,因此必须从服务器解决此问题。为此你需要从服务器到修复一些跟踪。


请检查之前的讨论(解答线程很少),如果它可以解决你的问题:


http://social.msdn.microsoft.com/Search/en-US/?query=%20System.Net.Sockets.SocketException%3A%20An%20existing%20connection %20was%20forcibly%20closed%20by%第二十条%20remote%20host%20英寸%20System.Net.Sockets.Socket.ReceiveNoCheck%20安培; RQ =元:Search.MSForums.GroupID(01328876-91a4-41ba-861c-7cdd44d922f5)+网站:microsoft.com&安培; RN =所有+智能+寄存器+发展+论坛&安培; AC = 8


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

解决方案

Hi,

As you are able to send the data fine through WLAN, this issue has to be solved from server. For that you need have some trace from server to fix.

Please check this earlier discussions(there are few answered threads), if it can solve your problem:

http://social.msdn.microsoft.com/Search/en-US/?query=%20System.Net.Sockets.SocketException%3A%20An%20existing%20connection%20was%20forcibly%20closed%20by%20the%20remote%20host%20in%20System.Net.Sockets.Socket.ReceiveNoCheck%20&rq=meta:Search.MSForums.GroupID(01328876-91a4-41ba-861c-7cdd44d922f5)+site:microsoft.com&rn=All+Smart+Device+Development+Forums&ac=8


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆