Reputation: 478
What's the limit of data that I can return by WCF service? I tried to play around with maxReceivedMessageSize and other parameters but still dont know what exactly the limit? Even if I get rid of "size quota for incoming messages" issue I get "an existing connection was forcibly closed by the remote host".
I know that "pagging" is the best solution but at the moment I want to know what's MAX of data I can send to the client without additional complexity. Thanks!
Regards, Leonid
Upvotes: 2
Views: 340
Reputation: 7673
There are two places you have to edit: check this http://forums.silverlight.net/forums/t/40770.aspx
edit the ServiceReferences.ClientConfig to accept a large buffer.
binding name="BasicHttpBinding_MosaicService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
on the server in the web.config
add a Httpbinding and name it
which setts it to 2MB and tell the service to use this binding
<services>
<service behaviorConfiguration="TekPlayground.MosaicServiceBehavior"
name="TekPlayground.MosaicService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="ServicesBinding" contract="TekPlayground.MosaicService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
Upvotes: 1
Reputation: 1701
There are a lot of settings that influence the amount of data you can send/receive before limits are exceeded.
maxReceivedMessageSize
setting;maxStringContentLength
setting;maxArrayLength
setting;maxItemsInObjectGraph
setting.And, if you're hosting in IIS:
maxRequestLength
;maxAllowedContentLength
(under security/requestFiltering/requestLimits
).Upvotes: 0