.net – WCF Xml vs Binary Serialization Pros and Cons

netwcf

I know that if I use binary serialization with WCF I lose interopability.

If I'm willing to live with this I was wonderinf if there is an efficiency benefit in using binary over Xml.

And if there are any other pros and cons that I have not mentioned above

Best Answer

Yes - potentially a big one. XML serialized data is big compared with the binary equivalent. With binary, you lose readability and interoperability. You also lose the ability to host in IIS unless you are on Windows Server 2008 or Windows Vista or higher.

However, the performance gains if you are in a .NET to .NET scenario outweight these drawbacks in many situations.