Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is WCF readerQuotas and maxArrayLength?

Can anyone explain WCF <readerQuotas> to me? Specifically maxArrayLength.

According to MSDN:

maxArrayLength

A positive integer that specifies the maximum allowed array length of data being received by Windows Communication Foundation (WCF) from a client. The default is 16384.

What is it? Bytes?

What happens if I don't set it?

What happens if I set it and the message returned goes beyond the specified length?

Isn't it possible that the message may exceed even the maximum value set? Then what's the point of setting this value?

like image 230
Aditi Avatar asked May 17 '26 16:05

Aditi


1 Answers

I am trying to simplify this as best as possible:

  • maxArrayLength = how many elements can your array or list hold.
  • maxBytesPerRead = max bytes for the entire message
  • maxDepth = how many levels down can an array go? For example a class can have an arrays, and each element has an array, and each element of that has an array.....
  • maxStringContentLength = max XML content length
like image 177
Jeff Avatar answered May 20 '26 06:05

Jeff