.NET Framework Developer Center >
.NET Development Forums
>
Windows Communication Foundation
>
How to specify custom encoder in web.config
How to specify custom encoder in web.config
- I wrote a custom encoder and called it MixedBindingEelement. My current config looks like this:
<bindingElementExtensions><add name="MixedEncoding" type="MixedBindingEelement, MixedEncoder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /></bindingElementExtensions>
and this:
<wsHttpBinding><binding name="AttachmentServiceSoapBinding" maxReceivedMessageSize="67108864" messageEncoding="Mtom"><readerQuotas maxArrayLength="67108864" /></binding></wsHttpBinding>
How to I tell it to use the custom encoder?
Thanks,
Dave
Answers
- Hi Dave, you should create a custom binding:
<bindings> <customBinding> <binding name="MyBinding"> <MixedEncoding> ... </MixedEncoding > <security> ... </security> <httpTransport /> </binding> </customBinding> </bindings>In order to transform the wsHttpBinding to a custom binding, try using WcfBindingBox.Regards,Stipe Ivan- Marked As Answer byRiquel_DongModeratorFriday, November 13, 2009 8:57 AM
- hi,
Here is artcle about How to use custom encoder.
Custom Message Encoder: Custom Text Encoder and sample:
http://msdn.microsoft.com/en-us/library/ms751486.aspxDownload sample
May it help you.
Regards
Frank Xu Lei--谦卑若愚,好学若饥
专注于.NET平台下分布式应用系统开发和企业应用系统集成
Focus on Distributed Applications Development and EAI based on .NET
欢迎访问老徐的中文技术博客:Welcome to My Chinese Technical Blog
欢迎访问微软WCF中文技术论坛:Welcome to Microsoft Chinese WCF Forum
欢迎访问微软WCF英文技术论坛:Welcome to Microsoft English WCF Forum- Marked As Answer byRiquel_DongModeratorFriday, November 13, 2009 8:57 AM
All Replies
- Hi Dave, you should create a custom binding:
<bindings> <customBinding> <binding name="MyBinding"> <MixedEncoding> ... </MixedEncoding > <security> ... </security> <httpTransport /> </binding> </customBinding> </bindings>In order to transform the wsHttpBinding to a custom binding, try using WcfBindingBox.Regards,Stipe Ivan- Marked As Answer byRiquel_DongModeratorFriday, November 13, 2009 8:57 AM
- hi,
Here is artcle about How to use custom encoder.
Custom Message Encoder: Custom Text Encoder and sample:
http://msdn.microsoft.com/en-us/library/ms751486.aspxDownload sample
May it help you.
Regards
Frank Xu Lei--谦卑若愚,好学若饥
专注于.NET平台下分布式应用系统开发和企业应用系统集成
Focus on Distributed Applications Development and EAI based on .NET
欢迎访问老徐的中文技术博客:Welcome to My Chinese Technical Blog
欢迎访问微软WCF中文技术论坛:Welcome to Microsoft Chinese WCF Forum
欢迎访问微软WCF英文技术论坛:Welcome to Microsoft English WCF Forum- Marked As Answer byRiquel_DongModeratorFriday, November 13, 2009 8:57 AM
- Thanks guys that helped me through.
Dave


