Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WCF error, System.ServiceModel.CommunicationException the maximum message size quota

Status
Not open for further replies.

Technokrat

Programmer
Jul 20, 2001
92
US
We are seeing this error related to an http file transfer request

WCF error, System.ServiceModel.CommunicationException the maximum message size quota for incoming messages has been exceeded.

I've seen several posts related to this message, with the general response of just bump it to the max.

What if you want to force a limit on the file transfer size. We want to allow the user to only transfer files 60MB(62914560) and smaller.

Which setting should be set to 62914560? maxStringContentLength or maxArrayLength?

Is there overhead for the envelope around the request? In other words will the max allowed download file size be 60MB? Or is it smaller, file size + request overhead <= 60MB?

If it is the latter, can this be determined. Is the overhead fixed size? Or is the overhead a function of other settings (eg-maxBytesPerRead)?

Does SSL impact the file (overall message) size? How much?

I'm trying to understand exactly how it works. Changing the size seems arbitrary. How do I know what the correct setting value is to allow downloads of files that are only 60MB or less. One of the things I am seeing is that a zip file of 53776931 bytes will throw the exception. Prior to the download, I'm checking the size of the file and it is clearly less than 60MB. What is causing the message to exceed the maximum message size?
 
in the client's app.config, try setting maxReceivedMessageSize to a higher value!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top