Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have developed the ASP.net project with C#.i have execute the script on button click event. in script i have accessed the information from the mysql server . if database contains lots of information then script required 2 to 5 min to execute this function.when i have accessed the data from server side to client side using button click it will disconnect the server connection & display the message as web page can not displayed .
how to incresed the timeout interval for long time communication to server?
Posted

You can do at the configuration level. For a client, you would want to adjust the sendTimeout attribute of a binding element. For a service, you would want to adjust the receiveTimeout attribute of a binding element.

HTML
<system.servicemodel>
  <bindings>
    <nettcpbinding>
    <binding name="longTimeoutBinding">
        receiveTimeout="00:10:00" sendTimeout="00:10:00">
      <security mode="None" />
    </binding>
    </nettcpbinding>
   </bindings>

  <services>
    <service name="longTimeoutService">
      behaviorConfiguration="longTimeoutBehavior">
      <endpoint address="net.tcp://localhost/longtimeout/">
        binding="netTcpBinding" bindingConfiguration="longTimeoutBinding">

      </endpoint>
    </service>
  
</services></system.servicemodel>
 
Share this answer
 
Comments
vrushali katkade 30-Mar-12 3:24am    
is it possible to set time in hour
XML
You can increase execution timeout by setting executionTimeout attribute of httpRuntime element within web.config file under system.web element.

<httpRuntime executionTimeout="3600" ... />
 
Share this answer
 
v2

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