ASP.NET Setup for .NET Framework 3.5 / 4.x |
ASP.NET setup for RAD PDF requires a reference to the RadPdf.dll in your web application and minor changes to your site's web.config file.
Copy RadPdf.dll into the bin directory of your web application. Assuming RAD PDF was installed in the default location and a system disk of C, this DLL should be in the directory:
C:\Program Files\RAD PDF\WebControl
RAD PDF can also be installed into your Visual Studio toolbox by right clicking the toolbox and selecting "Choose Items..." and selecting the RadPdf.dll
In order to use the RAD PDF Web Control, additions will need to be made to your web application's web.config file.
For IIS 6 (or IIS 7+ with Managed Pipeline Mode set to "Classic"), the httpHandlers element of the system.web element must contain:
<add path="RadPdf.axd" verb="GET,POST" type="RadPdf.Web.HttpHandler.PdfHttpHandler" />
For IIS 7 (and later) with Managed Pipeline Mode set to "Integrated", the handlers element of the system.webServer element must contain:
<add path="RadPdf.axd" verb="GET,POST" name="RadPdfHandler" preCondition="integratedMode" type="RadPdf.Web.HttpHandler.PdfHttpHandler" />
This will add RAD PDF as the http handler for all requests to the URL RadPdf.axd.
The appSettings element of the configuration element must contain the following keys:
<add key="RadPdfLicenseKey" value="YOUR LICENSE KEY" />
The appSettings element of the configuration element may contain the following keys:
<add key="RadPdfConnectionString" value="Server=.\SQLExpress;Database=RadPdf;Trusted_Connection=Yes;" />
TopNamespace.SubNameSpace.ContainingClass+NestedClass,MyAssembly
For example, to register a custom Integration Provider class with the type name CustomPdfIntegrationProvider located in an assembly with the name MyAssembly, a value of "CustomPdfIntegrationProvider,MyAssembly" should be used.
<add key="RadPdfIntegrationProvider" value="CustomPdfIntegrationProvider,MyAssembly" />
For example, to register a custom Integration Provider class with the type name CustomPdfIntegrationProvider located in your web application's App_Code directory, a value of "CustomPdfIntegrationProvider,App_Code" should be used.
<add key="RadPdfIntegrationProvider" value="CustomPdfIntegrationProvider,App_Code" />
To use the default Integration Provider, a value of "DefaultPdfIntegrationProvider" should be used or the key left absent from the web.config file.
<add key="RadPdfIntegrationProvider" value="DefaultPdfIntegrationProvider" />
Note |
---|
These legacy settings are provided for backwards compatibility with previous versions of RAD PDF. They will be removed in a future version and should not be used in new applications. |
The appSettings element of the configuration element may contain the following legacy keys if using the DefaultPdfIntegrationProvider (or no integration provider is specified in PdfIntegrationProvider):
<add key="RadPdfDocumentOverheadMax" value="1048576" />
<add key="RadPdfHttpCompression" value="1" />
<add key="RadPdfSearchTermMin" value="3" />
<add key="RadPdfServiceLocation" value="localhost:18104" />
The following is a sample web.config file for use in IIS 6, 7, 7.5, 8, and 8.5:
<?xml version="1.0"?> <configuration> <appSettings> <add key="RadPdfConnectionString" value="Server=.\SQLExpress;Database=RadPdf;Trusted_Connection=Yes;" /> <add key="RadPdfLicenseKey" value="YOUR LICENSE KEY" /> </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="RadPdfHandler" preCondition="integratedMode" type="RadPdf.Web.HttpHandler.PdfHttpHandler" /> </handlers> </system.webServer> </configuration>