Error while executing web part: System.Net.WebException: The operation has timed out

Hello SharePointers,

When do you have a custom webpart, if its get timed out due to various data sources involved and throws the following error.

“Unable to display this Web Part. For information on how to solve the problem, open this web page in an HTML editor compatible with Microsoft SharePoint Foundation, such as Microsoft SharePoint Designer. If the problem persists, contact the web server administrator.
Correlation Identifier”

This occurs because of the default “Data-retrieval-services-timeout” timeout of 30 seconds. The data source takes more than 30 seconds to send the data. In order to avoid this, you have to increase the timeout to 45 seconds. Below are the powershell command to achieve it.

stsadm -o setproperty -pn data-retrieval-services-timeout -pv 45

Happy SharePointing 🙂

Leave a Reply

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