none
TimeoutException - Opening a connection with https RRS feed

  • Question

  • Hi,

    I have a service hosted in IIS that is consumed in a SharePoint workflow. The WCF Service always work from my machine, but it can not always open a connection in integration:

    System.TimeoutException: The request channel timed out while waiting for a reply after 00:01:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. ---> 
    System.TimeoutException: The HTTP request to 'https://urlservice.com/TaskMgmtService.svc' has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The operation has timed out 

    It can successfully consume it after some attempt (can go from 2nd to 5th times).

    As long as the connection is still open, there will be no problem consuming the service (so within 10 minutes because of:

    receiveTimeout="00:10:00"

    There is never a problem with HTTP, only https with credential. Here is my web.config

    <system.serviceModel>
        <bindings>
          <basicHttpBinding>
           <binding name="basicHttpBinding_ITaskInternService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
              <readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
                        <security mode="TransportWithMessageCredential">
                            <transport clientCredentialType="None" proxyCredentialType="None"
                                realm="" />
                            <message clientCredentialType="UserName" algorithmSuite="Default" />
                        </security>
            </binding>
          </basicHttpBinding>
        </bindings>
        <services>
          <service behaviorConfiguration="Service.TaskMgmt.TaskMgmtBehavior" name="Service.TaskMgmt.TaskMgmtService">
            <endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding_ITaskInternService" name="HttpIntern" contract="Service.TaskMgmt.ITaskMgmtService">
            </endpoint>
            <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
            </service>
        </services>
        <behaviors>
           <behavior name="Service.TaskMgmt.TaskMgmtBehavior">
              <serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="100" maxConcurrentInstances="100" />
              <serviceMetadata httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
              <serviceCredentials>
                <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="Service.TaskMgmt.UserAuthentication,Service.TaskMgmt" />
              </serviceCredentials>
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>


    When it can consume the service, it will never take more than 2 seconds, so it will be not necessary to increase the other values.

    When there is the Timeout Exception, I can't see any log in my service, that's mean it didn't reach it at all...

    What can be the problem if there is no problem in my test environment but only in the integration server?









    • Edited by okdreamy Monday, June 3, 2013 1:00 PM
    Monday, June 3, 2013 12:51 PM

Answers

All replies