异步调用Web服务方法 [英] Calling a webservice method asynchronously
问题描述
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屋!