简体   繁体   English

Web服务超时问题

[英]Web service time out problem

have a data transfer between an vb application and web service. 在vb应用程序和Web服务之间进行数据传输。 The application is in local network and connects to the internet thru a gateway. 该应用程序位于本地网络中,并通过网关连接到Internet。 Connection is ADSL. 连接是ADSL。 Web service is on the remote server. Web服务位于远程服务器上。 Strange thing is that data transfer sometimes work and sometimes not. 奇怪的是,数据传输有时是有效的,有时则不然。 When it doesn't work, it throws an exception of type 'System.Net.WebException' and message is 'The operation has timed-out'. 当它不起作用时,它会抛出“System.Net.WebException”类型的异常,并且消息为“操作已超时”。 And it doesn't depend on amount of data.And also sometimes it raises error like connection terminated.When i restart my test server,problem gones away but what can cause it?Test server's firewall is closed. 并且它不依赖于数据量。并且有时它会引发错误,例如连接终止。当我重新启动我的测试服务器时,问题会消失,但是什么可能导致它?测试服务器的防火墙已关闭。

The ADSL is not the problem, I do that alot. ADSL不是问题,我做的很多。 you need to make some more tests to rule out several options: once you get a timeout - issue another call from another process - see if the timeout stays until you restart the server. 你需要做一些更多的测试来排除几个选项:一旦你得到超时 - 从另一个进程发出另一个调用 - 看看超时是否一直持续到你重新启动服务器。 put debug lines to console - about the call (before invoke, during the operation, and after invoke) - to see where it hangs. 将调试行放到控制台 - 关于调用(在调用之前,在操作期间和调用之后) - 查看它挂起的位置。

see if you can trace the actual message from the moment it reaches the server until it lefts is (like in wcf tracing options) 看看你是否可以从它到达服务器的那一刻起跟踪实际的消息,直到它是lefts(就像在wcf跟踪选项中一样)

this should reveal the position that the call might be stuck. 这应该揭示呼叫可能被卡住的位置。

sometimes a malformed data that should be returned might casue this behaviour, or even a cyclic reference in the data. 有时,应返回的格式错误的数据可能会导致此行为,甚至是数据中的循环引用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM