gmail user
gmail user

Reputation: 2783

set the MaxReceivedMessageSize in wcf

We've recently developed a wcf based service. And started exposing to external clients. But sometimes, they receive the maximum message size exception. I know that they can set in the config file and it'll work. But, it really looks bad on our side. Is there any way I can set the proper size on my side and stop causing this error?

Upvotes: 2

Views: 10286

Answers (2)

BrandonZeider
BrandonZeider

Reputation: 8152

It needs to be set on the client as they are receiving the large message.

Example:

<binding
   name="YourNameHere"
   maxReceivedMessageSize="2147483647">
</binding>

Upvotes: 6

William Xifaras
William Xifaras

Reputation: 5312

You should look into using WCF Behaviors.

http://msdn.microsoft.com/en-us/magazine/cc163302.aspx

Upvotes: 0

Related Questions