Note that there are some explanatory texts on larger screens.

plurals
  1. POsend 1 array with 1 million integers with WCF Web Service equal big timeout?
    primarykey
    data
    text
    <p>I created a webService which is related to my application c #.</p> <p><strong>All methods works perfectly</strong>. However, a function has problems "<strong>TimeOut</strong>". This method should return me an array of integers with approximately [1,000,000] <strong>(1 million) of integers.</strong> I get the data correctly but about <strong>4-5 minutes</strong> after calling my method! Is it normal to wait about 5 minutes for a table 1millions of integers? I find it can take too long and annoying for my application. Do you know a solution or a better way to send large data?</p> <ul> <li>Other compression method? </li> <li>Other response format (xml, array ..)?</li> </ul> <hr> <p>Here is my configuration file on the server side:</p> <p><strong>Web.config</strong></p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;configuration&gt; &lt;system.web&gt; &lt;customErrors mode="Off"/&gt; &lt;compilation debug="true" targetFramework="4.0" /&gt; &lt;/system.web&gt; &lt;system.serviceModel&gt; &lt;diagnostics performanceCounters="Default" /&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="Elevation_ServiceSoap" closeTimeout="00:02:00" messageEncoding="Mtom" openTimeout="00:02:00" receiveTimeout="00:02:00" sendTimeout="00:02:00" allowCookies="true" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&gt; &lt;/binding&gt; &lt;binding name="BasicHttpBinding_IGeocodeService" allowCookies="true" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&gt; &lt;/binding&gt; &lt;binding name="BasicHttpBinding_IImageryService" allowCookies="true" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address="http://gisdata.usgs.gov/XMLWebServices2/Elevation_Service.asmx" binding="basicHttpBinding" bindingConfiguration="Elevation_ServiceSoap" contract="ElevationService.Elevation_ServiceSoap" name="Elevation_ServiceSoap" /&gt; &lt;endpoint address="http://dev.virtualearth.net/webservices/v1/geocodeservice/GeocodeService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IGeocodeService" contract="GeocodeService.IGeocodeService" name="BasicHttpBinding_IGeocodeService" /&gt; &lt;endpoint address="http://dev.virtualearth.net/webservices/v1/imageryservice/imageryservice.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IImageryService" contract="ImageryService.IImageryService" name="BasicHttpBinding_IImageryService" /&gt; &lt;/client&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior&gt; &lt;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment - binaryHttp --&gt; &lt;serviceMetadata httpGetEnabled="true"/&gt; &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --&gt; &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt; &lt;dataContractSerializer maxItemsInObjectGraph="10000000"/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt; &lt;/system.serviceModel&gt; &lt;system.webServer&gt; &lt;modules runAllManagedModulesForAllRequests="true"/&gt; &lt;/system.webServer&gt; &lt;/configuration&gt; </code></pre> <p>Here is my configuration file on the client side:</p> <p><strong>App.config</strong></p> <pre><code> &lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="BasicHttpBinding_IService1" closeTimeout="00:02:00" openTimeout="00:02:00" receiveTimeout="00:02:00" sendTimeout="00:02:00" allowCookies="true" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;behaviors &gt; &lt;serviceBehaviors&gt; &lt;behavior name="debug"&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;dataContractSerializer maxItemsInObjectGraph="10000000"/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;client&gt; &lt;endpoint address="http://blalbloslblalbla/WebServiceArcadia_World_deploy/Service1.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1" contract="WebServiceArcadia_World.IService1" name="BasicHttpBinding_IService1" /&gt; &lt;/client&gt; &lt;services&gt; &lt;service name="WebServiceArcadia_World_deploy.IService1"&gt; &lt;/service&gt; &lt;/services&gt; &lt;/system.serviceModel&gt; &lt;system.web&gt; &lt;httpRuntime executionTimeout="90" maxRequestLength="1048576" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/&gt; &lt;/system.web&gt; &lt;/configuration&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload