Why would one use the ChannelFactory to instantiate a WCF proxy rather than a Service Reference?

后端 未结 3 1975
北荒
北荒 2021-01-05 07:23

There seem to be two ways to instantiate WCF service proxies described here. My question is why would one want to use the ChannelFactory to instantiate a WCF proxy and what

3条回答
  •  一向
    一向 (楼主)
    2021-01-05 08:01

    One of the specific cases would while developing any office add-in or visual studio add-in projects where you don't have the app.config file.

    Also , lets say in an organisation where you want to standardise on certain bindings and certain endpoint security patterns. you would want to create an API which developers can easily use to create a proxy, in this case you would encapsulate all the binding information using channelfactory.

提交回复
热议问题