SqlServerPdfStorageProviderConnectionString Property |
Namespace: RadPdf.Integration
Exception | Condition |
---|---|
ArgumentNullException | The storage connection string can not be null. |
A connection string set using this property will override the connection string set in the web.config file (if one exists).
using System; using System.Web; using RadPdf.Integration; public class CustomPdfIntegrationProvider : PdfIntegrationProvider { public CustomPdfIntegrationProvider() : base() { // Set storage provider settings, e.g. a new connection string ((SqlServerPdfStorageProvider)this.StorageProvider).ConnectionString = "Server=.;Database=RadPdf;Trusted_Connection=Yes;"; } }
<?xml version="1.0"?> <configuration> <appSettings> <add key="RadPdfLicenseKey" value="DEMO"/> <add key="RadPdfIntegrationProvider" value="CustomPdfIntegrationProvider,App_Code"/> </appSettings> <system.web> <httpHandlers> <add path="RadPdf.axd" verb="GET,POST" type="RadPdf.Web.HttpHandler.PdfHttpHandler"/> </httpHandlers> </system.web> <!-- 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. --> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <handlers> <add path="RadPdf.axd" verb="GET,POST" name="PdfHttpHandler" preCondition="integratedMode" type="RadPdf.Web.HttpHandler.PdfHttpHandler"/> </handlers> </system.webServer> </configuration>