Click or drag to resize

SqlServerPdfStorageProviderCommandTimeout Property

Gets or sets the wait time before terminating the attempt to execute an internal SqlCommand and generating an error.

Namespace:  RadPdf.Integration
Assembly:  RadPdf (in RadPdf.dll) Version: (
public int CommandTimeout { get; set; }

Property Value

Type: Int32
The time in seconds to wait for a single internal SqlCommand to execute. The default is DefaultCommandTimeout.
ArgumentExceptionThe property value assigned is less than 0.

A value of 0 indicates no limit (an attempt to execute a command will wait indefinitely).

CommandTimeout has no effect when the command is executed against a context connection (a SqlConnection opened with "context connection=true" in the connection string).

This property controls the timeout per command executed. Internally, RAD PDF may execute several commands during a single procedure. This value simply sets the CommandTimeout used by each internal SqlCommand instance.

The following example overrides the default PdfIntegrationProvider to create a custom Integration Provider for the web application which specifies the SQL Server connection string.
using System;
using System.Web;

using RadPdf.Integration;

public class CustomPdfIntegrationProvider : PdfIntegrationProvider
    public CustomPdfIntegrationProvider() : base()
        // Set a 10 minute timeout instead of the default (30 seconds)
        ((SqlServerPdfStorageProvider)this.StorageProvider).CommandTimeout = 600;
The following web.config file registers the above custom Integration Provider. This example assumes that CustomPdfIntegrationProvider is in the directory App_Code of your ASP.NET web application.
<?xml version="1.0"?>
    <add key="RadPdfLicenseKey" value="DEMO"/>
    <add key="RadPdfIntegrationProvider" value="CustomPdfIntegrationProvider,App_Code"/>
      <add path="RadPdf.axd" verb="GET,POST" type="RadPdf.Web.HttpHandler.PdfHttpHandler"/>
    The system.webServer element is for use with IIS 7 (and later) when Managed Pipeline Mode is set to "Integrated".
    It will be ignored in other versions of IIS.
    <validation validateIntegratedModeConfiguration="false"/>
      <add path="RadPdf.axd" verb="GET,POST" name="PdfHttpHandler" preCondition="integratedMode" type="RadPdf.Web.HttpHandler.PdfHttpHandler"/>
See Also