Click here to Skip to main content
14,978,657 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends,
I have created WCF and Web Api services. I have created WCF and Web Api REST full web services. In this web services i am getting Error:
C#
One or more errors occurred.::: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result()
for Large data transmission. EX: In my case 25000 rows with having 25 columns of fetch query i am providing the response. in this case some times it's giving a proper response some times it's throwing a error
C#
One or more errors occurred.::: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result()
.
This error is coming in both of them. My WCF Config. Like this

XML
<system.web>
   <compilation debug="true"  />
   <httpRuntime maxRequestLength ="1048576" />
 </system.web>
 <system.serviceModel>
   <serviceHostingEnvironment multipleSiteBindingsEnabled="true"></serviceHostingEnvironment>
   <services>
     <service name="wcfTestHC.TestHC" behaviorConfiguration= "RestServiceBehavior" >
       <endpoint address="" behaviorConfiguration="RestEndpointBehavior" binding="webHttpBinding"  bindingConfiguration="RESTBinding"  contract="wcfTestHC.ITestHC" />
       <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
     </service>
   </services>
   <behaviors>
     <endpointBehaviors>
       <behavior name="RestEndpointBehavior" >
         <webHttp helpEnabled="true" />
         <dataContractSerializer maxItemsInObjectGraph="2147483647" />
       </behavior>
     </endpointBehaviors>
     <serviceBehaviors>
       <behavior name="RestServiceBehavior" >
         <serviceMetadata httpGetEnabled="true" />
         <serviceThrottling maxConcurrentCalls="250" maxConcurrentInstances="75" maxConcurrentSessions="50"/>
         <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
       </behavior>
     </serviceBehaviors>
   </behaviors>
   <bindings>
     <webHttpBinding>
         <binding name="RESTBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
                sendTimeout="00:01:00"  allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" useDefaultWebProxy="true">
         <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"  maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" maxArrayLength="2147483647"/>
       </binding>
     </webHttpBinding>
   </bindings>
 </system.serviceModel>
 <system.webServer>
   <modules runAllManagedModulesForAllRequests="true"/>
   <directoryBrowse enabled="true"/>
   <security>
     <requestFiltering>
       <requestLimits maxAllowedContentLength ="1073741824"></requestLimits>
     </requestFiltering>
   </security>
 </system.webServer>



So please can any one suggest me how to over come this issue.


Thanks in advance,
Mohan G
Posted
Updated 22-Oct-20 21:03pm
v5

1 solution

I have the same problem. If you did, how did you do it?

Thanks.
   
Comments
Richard Deeming 27-Oct-20 12:36pm
   
"Me too" is not a solution to this question.

If you want to add a comment or ask for more information, click the "Have a Question or Comment?" button under the question and post a comment. Do not post your comment as a solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900