Note that there are some explanatory texts on larger screens.

plurals
  1. POIncreasing WCF Timeout just increases time it takes for client to acknowledge error
    primarykey
    data
    text
    <p>We have a wcf service that calls a slow server-side method. This method basically creates a file on the server then returns the path so the client can download that file.</p> <p>I know the server method completes as the file gets written to the filesystem, the next line of code simply returns the path to this file.</p> <p>On the client the call obviously gets made but the handler is never invoked, it just sits there until timeout occurs. If I increase the timeout it will just wait longer and just silently fail when the longer timeout incurs. Like I said I can see the remote method is finishing so it isn't actually timing out but somehting is going wrong in the response.</p> <p>One other possibly relevant point is I have other clients that would be making several different requests to the server during this process but I'm unsure if that is relevant or not.</p> <p>Server Config:</p> <pre><code>&lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="WebServiceBehavior"&gt; &lt;serviceMetadata httpsGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;dataContractSerializer maxItemsInObjectGraph="2147483647" /&gt; &lt;serviceCredentials&gt; &lt;userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="WebServiceConsumerValidator" /&gt; &lt;/serviceCredentials&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="WebServiceBinding" maxReceivedMessageSize="2147483647" closeTimeout="01:00:00" openTimeout="01:00:00" receiveTimeout="01:00:00" sendTimeout="01:00:00"&gt; &lt;readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647"/&gt; &lt;security mode="TransportWithMessageCredential" &gt; &lt;message clientCredentialType="UserName" /&gt; &lt;transport clientCredentialType="None" proxyCredentialType="None" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;services&gt; &lt;service behaviorConfiguration="WebServiceBehavior" name="AlarmNotifierWebService"&gt; &lt;endpoint address="" binding="basicHttpBinding" contract="IAlarmNotifierWebService" bindingConfiguration="WebServiceBinding"&gt; &lt;identity&gt; &lt;dns value="localhost"/&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/&gt; &lt;/service&gt; &lt;/services&gt; </code></pre> <p>Client config</p> <pre><code> &lt;bindings&gt; &lt;binding name="LiveManagementWebService" closeTimeout="01:00:00" openTimeout="01:00:00" receiveTimeout="01:00:00" sendTimeout="01:00:00" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"&gt; &lt;readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/&gt; &lt;security mode="TransportWithMessageCredential"&gt; &lt;transport clientCredentialType="None" proxyCredentialType="None" realm=""/&gt; &lt;message clientCredentialType="UserName" algorithmSuite="Default"/&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;behaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="myEndpointBehaviour"&gt; &lt;dataContractSerializer maxItemsInObjectGraph="2147483647"/&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;/behaviors&gt; &lt;client&gt; &lt;endpoint address="https://myserver.com/WebServices/ManagementWebService.svc" binding="basicHttpBinding" bindingConfiguration="LiveManagementWebService" contract="IManagementWebService" name="LiveManagementWebService" behaviorConfiguration="myEndpointBehaviour"/&gt; &lt;/client&gt; </code></pre> <p>Note the maxed out values are because this service returns alot of data in some instances.</p> <p>The calling code:</p> <pre><code>string downloadPath; using (var managementWebServiceClient = new ManagementWebServiceClient(App.ManagementWebServiceClientName)) { managementWebServiceClient.ClientCredentials.UserName.UserName = "username"; managementWebServiceClient.ClientCredentials.UserName.Password = "password"; managementWebServiceClient.Open(); // never gets past the following statement: downloadPath = managementWebServiceClient.BuildFileAndReturnDownloadUrl("someArg1", "someArg2"); managementWebServiceClient.Close(); } //Fetch the file var webClient = new System.Net.WebClient(); webClient.DownloadFile(downloadPath , "filename.sdf"); </code></pre> <p>The aforementioned other clients call different methods but in the same manner. Any suggestions as to where the problem might be? Happy to provide any further information as required.</p>
    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