Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF REST using HTTP Post message size limitation

Tags:

wcf

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 as 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.

like image 830
Cshah Avatar asked Oct 11 '22 19:10

Cshah


1 Answers

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.

like image 74
Ladislav Mrnka Avatar answered Oct 20 '22 05:10

Ladislav Mrnka