Welcome to MSDN Blogs Sign in | Join | Help

MADHU@MICROSOFT BLOG

All About Distributed apps

Syndication

News

Madhu Ponduru works at Microsoft. Everything here, though, is his personal opinion and is not read or approved by Microsoft before it is posted. No warranties or other guarantees will be offered as to the quality of the opinions or anything else offered here.
How to change binding properties(custom binding)

Uri baseAddress = new Uri("http://localhost:8081/testsvc");

ServiceHost sh = new ServiceHost(typeof(CalculatorService), baseAddress);

WSDualHttpBinding b = new WSDualHttpBinding();

BindingElementCollection bec = b.CreateBindingElements();

 

TextMessageEncodingBindingElement sbe = bec.Find<TextMessageEncodingBindingElement>();

sbe.MessageVersion = MessageVersion.Soap11WSAddressingAugust2004;

 

CustomBinding cb = new CustomBinding(bec);

sh.AddServiceEndpoint("WCFSAMPLES.ICalculatorDuplex", cb, "");

sh.Open();

Console.WriteLine("service is ready");

Console.ReadKey();

 

 

Published Tuesday, July 25, 2006 12:16 PM by madhu_ponduru@hotmail.com


Attachment(s): SvcUtil.exe.config

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# MADHU MICROSOFT BLOG How to change binding properties custom binding | unemployment office @ Tuesday, June 16, 2009 3:44 AM

PingBack from http://unemploymentofficeresource.info/story.php?id=14870

MADHU MICROSOFT BLOG How to change binding properties custom binding | unemployment office

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement  
Page view tracker