另一个线程中的 ASP.NET Web 服务调用

标签 asp.net multithreading web-services

我们正在对一些数据更新进行网络服务调用以同步另一个数据库。此 Web 服务调用会占用一些响应时间。将它添加到线程中会有帮助吗?这样做有什么缺点吗?如果 Web 服务调用失败,它就会失败,仅此而已。这就像一个火而忘记的电话。

最佳答案

您可以使用使用异步回调的异步 Web 服务调用来防止主线程阻塞。

By making an asynchronous call to a Web service, you can continue to use the calling thread while you wait for the Web service to respond. This means users can continue to interact with your application without it locking up while the Web service access proceeds.

来自 MSDN:Making Asynchronous Web Service Calls

关于另一个线程中的 ASP.NET Web 服务调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8749845/

相关文章:

android - 从 Android 设备调用 Web 服务

asp.net - 轻松实现存储库模式

javascript - 在 AspNet 上使用 onClick 事件隐藏文本框而不刷新页面

java - 如何使用 ExecutorService 管理未知数量的 Callables 的返回值?

android - 为什么有人想要绑定(bind)服务(而不创建它),而不是使用线程?

web-services - 如何调用部署在VPS中的web服务

mysql - 计算多个表行并在标签中显示总计

asp.net 标签和 asp.net 文本框没有正确排列?

java - 当一个线程失败时停止 ExecutorService 线程。 & 返回异常

android - 使用 Ksoap2 检查信封 (Android)