简体   繁体   中英

How to configure message format for a binding in WCF

I found that there are default messaging formats for existing binding types. However, if I need to choose a XML message format in TCP binding, would that be configured in app.config itself?

I suppose WCF supports different message format transports, but however, one should choose a binding corresponding to the message encoding type that is intended to be transported.

On Referring this SO ques , custom web message formats are supported by WebHttpBinding (GET Json etc) and this SO ques refers nettcpbinding to support binary encoded format of XML.

I don't think the message types could be configured in app.config, for eg, a Json type could not be chosen for NetTCPbinding over the config file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM