我有这种方法的 WCF 服务。该方法具有 WebInvoke 属性。我怎样才能异步调用它?
[WebInvoke(UriTemplate = "*", Method = "*")]
public Message HandleRequest()
{
var webContext = WebOperationContext.Current;
var webClient = new WebClient();
return webContext.CreateStreamResponse(webClient.OpenRead("http://site.com"), "text/html");
}