Is there an issue sending XML via WCF?

后端 未结 2 1265
遥遥无期
遥遥无期 2021-01-21 14:54

Suppose you have an XElement or an XmlElment or even a string containing xml that you want to send via WCF. Are there any special precautions you have to take? The question ju

相关标签:
2条回答
  • 2021-01-21 15:43

    I hade no problem sending XML as a string with WCF. If your XML exceed a few Kb, you must make changes in client&server to allow larger data amounts.

    0 讨论(0)
  • 2021-01-21 15:45

    Just thought I'd add that in most cases these will be configuration changes, unless you're doing all your binding setup through code.

    Specifically, you'll probably need to adjust the MaxReceivedMessageSize property of the binding and the reader quotas on the receiving side.

    This is not related specifically to sending XML, by the way, it just comes up whenever you're sending largish messages because the default quotas are very conservative (64kb max message size, for example).

    0 讨论(0)
提交回复
热议问题