Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create WCF Client without auto generated proxy

Tags:

looking at

WCF ChannelFactory vs generating proxy

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

I've been looking online for a while and i didn't find any complete example(Proxy class, web.config)

Could you provide an example or links to resources?

like image 945
GigaPr Avatar asked Dec 02 '11 19:12

GigaPr


People also ask

What is WCF client proxy?

Actually Proxy is a class in WCF that is used to communicate with client application. We can simply get the entire configuration through the proxy class. There is no need to do extra effort to generate the configuration setting for the client. Proxy class used when you think that your service must be loosely coupled.


1 Answers

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.

like image 159
Tad Donaghe Avatar answered Oct 24 '22 18:10

Tad Donaghe