开发者

WCF REST using HTTP Post message size limitation

开发者 https://www.devze.com 2023-03-11 02:29 出处:网络
I am using Jquery ajax() ( with type: \"POST\")method to transmit some json serialized string to WCF RESTful Web Service?

I am using Jquery ajax() ( with type: "POST") method to transmit some json serialized string to WCF RESTful Web Service?

so is there a limitation on number of characters in JSON string that can be transmitted to WCF in a default configuration?

Question: If there is a limitation; how to increase the message size? what changes needed on WCF web.config?

The data I am serializing is a complex object and objects contains few other complex object a开发者_运维技巧s IList. I do have a working sample that "POST" the JSON data to WCF and save in SQL Server database.

But Message size limitation if any is a concern of mine.

Thanks,

P.S. keep in mind my client is html page (I am accessing WCF web service in JQuery (JavaSCript) Code.


When exposing service endpoint for jQuery you are using webHttpBinding. This binding as any other has many configuration options for limiting message size, string size, array size, etc. Check webHttpBinding description and target properties like maxReceivedMessageSize or readerQuotas.

The binding itself is not only place where you can limit the incoming message size next place is httpRuntime and IIS.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号