异步调用Web服务方法 [英] Calling a webservice method asynchronously

查看:70
本文介绍了异步调用Web服务方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


Hello,


我需要异步调用Web服务上的Register()方法(使用C#)。 Web服务中实际Register方法的实现不返回任何值。但是如果方法失败,它会引发异常。鉴于此,请注意以下
代码是否正常?

public void RegisterProduct(string productName)

{

   ;  await RegisterProductAsync();

}

解决方案

这是你应该发布的地方。


https://forums.asp.net/28的.aspx / 1?WCF + ASMX +和+其它+的Web +服务


Hello,

I need to call the Register() method on a Web service asynchronously (using C#). The implementation of the actual Register method in the Web service does not return any value. But it throws an exception if the method fails. Given this, does the following code look ok please?
public void RegisterProduct(string productName)
{
    await RegisterProductAsync();
}

解决方案

It's where you should post.

https://forums.asp.net/28.aspx/1?WCF+ASMX+and+other+Web+Services


这篇关于异步调用Web服务方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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