Is there a way to set a tiemout on the service side so that the request stops processing if it exceeds the timeout? I know I can time the request out on the client side, but that doesn't stop the processing of the request on the server.
I've tried adding the following binding:
<basicHttpBinding>
<binding name="timeout" receiveTimeout="00:01:00" closeTimeout="00:01:00" openTimeout="00:01:00" sendTimeout="00:01:00" />
</basicHttpBinding>
I've also tried adding the following in the system.web node (separately and together with the above):
<httpRuntime executionTimeout="60" /> <!-- timeout after 60 seconds -->
yes i can handle it you have to configure your web.config file it's look like
--> -->
And Your Client Side ServiceReferences.ClientConfig file looks like
There is no built in (out of the box) way to do this. All of the timeouts that you can set are related to transport settings. In short words, you have to do that yourself.
Please also see this answer about limiting WCF execution time.
We can set server side time out in "Binding" with:
This is the timeout that specifies how long the service can wait from the beginning of receiving a request until the message is processed. It’s server-side setting. When you send a large message to the service and the service needs long time to process, you would need to increase this setting.
http://msdn.microsoft.com/en-us/library/ms731361.aspx
Using these two timeouts should solve most timeout problems. However, when a WCF service is hosted in IIS/ASP.NET, another setting would also control the lifetime of the request:
You can set this up in your service bindings, the link below shows the values to set on the service side as well as client side.
http://geekswithblogs.net/smyers/archive/2011/10/05/wcf-service-message-timeouts-size-limits-tips-and-tricks.aspx