Share via


WorkItemTimeout Property

The WorkItemTimeout property of the WebPart class gets whether a work item, such as a data request started with RegisterWorkItemCallback method has timed out and must be ended.

Property Value

true if the work item has timed out; otherwise false.

Remarks

A custom Web Part class can query the WorkItemTimeout property to determine if any of its work items failed to complete in the timeout period, at which point any further work items should be discontinued. The timeout for work items can be configured by a system administrator in the ASP.NET web.config file by setting the Timeout attribute of the WebPartWorkItem element to a given number of milliseconds. If no setting is found in the web.config, the default is 5000 milliseconds. The following example increases the timeout to 7 seconds.

<SharePoint>
   <WebPartWorkItem Timeout="7000" />
</SharePoint>

Requirements

Platforms: Windows Server 2003

Security: Code Access Security