diff --git a/snippets/csharp/VS_Snippets_CFX/channelfactorybehaviors/cs/client.cs b/snippets/csharp/VS_Snippets_CFX/channelfactorybehaviors/cs/client.cs index fc894355651..f3945e17a69 100644 --- a/snippets/csharp/VS_Snippets_CFX/channelfactorybehaviors/cs/client.cs +++ b/snippets/csharp/VS_Snippets_CFX/channelfactorybehaviors/cs/client.cs @@ -13,9 +13,10 @@ public static void Main() { try { - // Picks up configuration from the config file. + WSHttpBinding binding = new WSHttpBinding(SecurityMode.Message); + EndpointAddress address = new EndpointAddress("http://localhost:8080/ServiceMetadata/SampleService"); ChannelFactory factory - = new ChannelFactory("WSHttpBinding_ISampleService"); + = new ChannelFactory(binding, address); // Add the client side behavior programmatically to all created channels. factory.Endpoint.Behaviors.Add(new EndpointBehaviorMessageInspector());