Click here to Skip to main content
15,900,378 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to Increase WCF service Timeout

This is my clientside WCF service Configuration
HTML
<system.serviceModel>
  <bindings>
   <basicHttpBinding>
     <binding name="BasicHttpBinding_Isvc_CRUD" maxBufferSize="2147483647"  closeTimeout="00:10:00"    sendTimeout="00:10:00" receiveTimeout="00:10:00"
                 maxReceivedMessageSize="2147483647">
      <security mode="None" />
     </binding>
   </basicHttpBinding>

WCF service Configuration in web.config of wcf

HTML
<services>
   <service name="wcfsvc_master.svc_CRUD">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="CRUD"
     contract="wcfsvc_master.Isvc_CRUD" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    <host>
     <timeouts closeTimeout="00:15:00" openTimeout="00:10:00" />
    </host>
   </service>
  </services>

This is Binding Configuration 

<bindings>
      <basicHttpBinding>
        <binding name="CRUD" maxReceivedMessageSize="999999999" closeTimeout="00:10:00"  sendTimeout="00:10:00" receiveTimeout="00:10:00"  />
      </basicHttpBinding>
    </bindings>
Posted
Comments
db7uk 25-May-12 9:20am    
Sorry, what is the issue you are getting?
Wael Al Wirr 30-May-12 4:53am    
what is the exception you are receiving ?

1 solution

If you have problem from service side, for example if you are using callbacks and you are trying to invoke the callback after a period of time and you are getting an exception saying channeldoesnot exist or channel faulted etc then you should increase the "receiveTimeout" section at server side to some valid period and this will solve the bug.
Remember you cannot make this value infinite but you can set the max value which is
C#
uint.MaxValue
 
Share this answer
 

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