WCF using ChannelFactory.CreateChannel with webHttp behavior
Posted
by BrettRobi
on Stack Overflow
See other posts from Stack Overflow
or by BrettRobi
Published on 2010-04-13T01:03:45Z
Indexed on
2010/04/13
1:13 UTC
Read the original article
Hit count: 964
wcf
|wcf-client
I've got a simple REST based service for which I am trying to create a client proxy using ChannelFactory. I want to be without a configuration file so I am trying to do this in code and I believe I have everything I used to have in .config except for the behavior. Can anyone tell me how I can get this config into c# code:
Here is the stripped down c# code I have now:
var endpoint = new EndpointAddress(urlCommServer); var binding = new WebHttpBinding(); return ChannelFactory.CreateChannel(binding, endpoint);
© Stack Overflow or respective owner