This error kept our team occupied for some time before finding a solution.
Error description:
A custom application on SharePoint copies some documents form one library to another after a button is pushed on a form button. When the button is pushed the application behaves as expected and the files are copied. For some reason now, the operation fails if the number of files being copied is quite a lot.
We were originally thinking about a timeout issue, an upload limit issue or the antivirus software interfering. After investigating all of these cases, we were unable to find a solution. A lot of research and some days later, we went back in to the problem before calling PSS and I found the solution on a blog post
Solution:
You need to define the executionTimeout parameter in the web.config file of the web application where the custom application is running. This parameter is not there by default. From what I have read out there, it seems that if this parameter is not defined, then a default value is assumed of 110 seconds
<httpRuntime executionTimeout=“200“ maxRequestLength=“51200“/>
Source for execution timeout:
http://blogs.msdn.com/pedram/archive/2007/10/02/how-the-execution-timeout-is-managed-in-asp-net.aspx