page 1 of 1
Comments: 0 | Views: 939

I’ve written a WCF service that uses TCP as the transport protocol.  I’ve got it hosted in a Windows service which I’ve written.  And now I’ve written a simple app, as a client, to test getting and sending the data.

 

Fetching data using my new WCF service works fine.  (YEAH!)  However, sending the data back to the service doesn’t work.  I get an error message that says, “The maximum message size quota for incoming messages has been exceeded for the remote channel.”  This doesn’t surprise me in the least, as I am sending back a boat load of data (one of the primary reasons why I choose TCP over HTTP was because of the data I would be sending and receiving).

 

I’ve been asking around to try and get help on how to increase the size of whatever buffers I need to, in order to make this work.  I was advised to increase the sizes of:

 

maxBufferPoolSize

maxBufferSize

maxReceivedMessageSize

 

and for the <readQuotas> element I was advised to increase the sizes to:

 

maxStringContentLength

maxByteArrayContentLength

maxDepth

maxBytesPerRead

maxNameTableCharCount

 

I’ve made the changes to the app.config file of the client application, but that didn’t help.  I’m not surprised by this, because I’ve received the data fine at the client.  It is the service side that needs the changes.  However, I don’t know where to put these changes into the app.config file.  Which element or section do I put them into?  And do I put them into only the WCF service’s app.config file, or do I put them into the Windows service’s app.config file, or both?

 

page 1 of 1
Comments: 0 | Views: 939
Microsoft Communities