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
Unfortunately, this isn't possible and there is a pretty good reason for it. CreateChannel
returns an object that implements the provided interface (IUserService
in your example). This interface is not async-aware, so there is no way it could return an object with the correct methods.
There are two possible solutions:
svcutil
do it for you).