Async WCF call with ChannelFactory and CreateChannel

前端 未结 3 1693
南旧
南旧 2021-02-06 00:47

I work on project where web application hosted on web server calls WCF services hosted on the app server. Proxy for WCF calls is created by ChannelFactory and calls are made via

3条回答
  •  情话喂你
    2021-02-06 01:47

    Unfortunately no, there is not.

    The async methods you get from svcutil are generated in the proxy based on your interface. There is nothing in the raw WCF channel like this.

    The only way is to alter the service reference to have native async calls, which you don't want, or to create your own wrapper around the channel and implement them yourself like the generated proxy does.

提交回复
热议问题