SharePoint Timeout error: thread was being aborted. Think about executionTimeout!

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

One thought on “SharePoint Timeout error: thread was being aborted. Think about executionTimeout!

  1. thanks it worked for me…
    Here is my problem..I have a feature which goes through each item in the List and deletes attachments. But before I add following code I used to get “Thread Was aborted” error. So I added




    in web.config and it worked. [It set the time to 3600sec. Also observe the path]

Leave a Reply

Your email address will not be published. Required fields are marked *