I have a restful WCF service that I need to call asynchronously from within an MVC controller.
What would be the "lightest" way of going about this?
我会使用它的异步方法(例如BeginGetResponse
发出HttpWebRequest
。
I guess you are aware of the AsyncController which you can use as the base class for your MVC controller (rather than plain old Controller). This will offer you a mechanism for calling methods asynchrously. See here for more details:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.