Create WCF Client without auto generated proxy

后端 未结 3 1805
暖寄归人
暖寄归人 2020-12-13 05:22

looking at

WCF ChannelFactory vs generating proxy

appears that the best practice in creating a WCF client is to create a proxy (Not autogenerated).

3条回答
  •  醉话见心
    2020-12-13 05:59

    This article is about exactly what you're asking, I believe:

    WCF the Manual Way... The Right Way

    Having shared that, though, creating your proxies manually is probably not always the best possible use of your time. The article goes into some great reasons for doing so - you'll certainly have more control, your clients may have an easier time, etc. but overall, doing things manually like this will require more of your time, and explaining to users of your service exactly how to use the proxy you provide may be a pain.

    There's a reason WCF allows metadata exchange and discovery and VS will auto create proxies for you.

    Either way, it's a cool article and a technique well worth learning.

提交回复
热议问题