We have a WCF service that executes certain stored procedures and returns the results to the silverlight client. Some of the stored procedures return up to 80K lines.
Below are the settings in web.config for the service
<system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> <behaviors> <serviceBehaviors> <behavior name="MyService.MyServiceBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> <dataContractSerializer maxItemsInObjectGraph="2147483647"/> </behavior> </serviceBehaviors> </behaviors> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_MyService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" receiveTimeout="00:40:00" openTimeout="00:40:00" closeTimeout="00:40:00" sendTimeout="00:40:00"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/> <security mode="None"/> </binding> </basicHttpBinding> <customBinding> <binding name="MyService.MyService.customBinding0"> <binaryMessageEncoding/> <httpTransport/> </binding> </customBinding> </bindings> <services> <service behaviorConfiguration="MyService.MyServiceBehavior" name="MyService.MyService"> <endpoint name="BasicHttpBinding_MyService" address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_MyService" contract="MyService.IMyService"/> </service> </services> </system.serviceModel>
And this is for the client
<system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> <behaviors> <serviceBehaviors> <behavior name="MyService_Behavior"> <serviceDebug includeExceptionDetailInFaults="true"/> <serviceMetadata httpGetEnabled="true"/> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="r1"> <dataContractSerializer maxItemsInObjectGraph="2147483647"/> </behavior> </endpointBehaviors> </behaviors> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_MyService" closeTimeout="00:03:00" openTimeout="00:03:00" receiveTimeout="00:10:00" sendTimeout="00:03:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <security mode="None"/> </binding> </basicHttpBinding> </bindings> <client> <endpoint name="BasicHttpBinding_MyService" address="http://localhost:8080/MyService/MyService.svc" behaviorConfiguration="r1" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_MyService" contract="MyService.IMyService" /> </client> </system.serviceModel>
Whenever the number of records goes beyond 20K, the service throws an error like TimeOut or NotFound. Why do you think this is happening? How can i fix this?
c # silverlight wcf
Kev
source share