This article provides basic troubleshooting tips and information.
When troubleshooting RAD PDF, it is important to remember that RAD PDF is comprised of several different components (an ASP.NET WebControl, an ASP.NET HttpHandler, a SQL Server Database, a Windows System Service, etc.).
The two most common problems when getting started with RAD PDF are caused when:
- RAD PDF was not installed on the server using our installer, instead only the Web Control (RadPdf.dll) was deployed. RAD PDF requires access to its installed system service (the RAD PDF Service) as well as other resources installed and configured. Simply copying the RAD PDF Web Control (RadPdf.dll) to your server does not properly deploy these other components.
SQL Server was not properly configured (if using the PdfWebControl and not the PdfWebControlLite).
Most commonly, the Web Application is properly setup to connect to the database),
but the RAD PDF Service does not have the proper permissions (because by default, it runs under a different Windows account).
The RAD PDF System Service must also be able to access the database so that it can retrieve, process, and save common resources.
This can be fixed in any of the following ways:
- Give the Windows user account, which the RAD PDF System Service logs in as, the necessary SQL Server database permissions. These permissions are specified in the SQL Server Setup Guide. By default, the RAD PDF System Service logs in as the "Local System" account (recognized in SQL Server as "NT AUTHORITY\SYSTEM").
- Configure the RAD PDF System Service to "Log On As" a user account which does have the necessary permissions. The user account can be changed in the Services console available in the Windows Administrative Tools folder.
- Configure the RAD PDF System Service to use WCF Impersonation. This is done via the RAD PDF Admin Tool. Simply check the "Use Impersonation" option, click "Save Settings", and restart the RAD PDF Service using the "Restart Service" button.
- Turn on "SQL Server and Windows Authentication mode" for the server being used. Then, create the SQL Server Authentication based login you wish to use. Assign that login the database permissions specified in the SQL Server Setup Guide. Finally, specify the new login's username and password in your connection string.
Unlike some ASP.NET WebControls, an error can occur within RAD PDF without an ASP.NET exception being raised. There are several locations to look for information about RAD PDF errors and exceptions.
- Windows Event Viewer - The Windows Event Viewer is the most comprehensive place to start troubleshooting. The RAD PDF System Service logs information, warnings, and errors to the Application Log using the Source "RAD PDF". Critical HttpHandler errors are logged to the Application Log as well. (Visibility into a custom HttpHandler can sometimes be difficult; as such, RAD PDF logs important notifications here.) ASP.NET also logs warnings here such as unhandled ASP.NET exceptions which may be useful in troubleshooting your RAD PDF configuration.
- Client Browser - As you likely know, if your web.config file is configured to display descriptive debug information, unhandled ASP.NET exceptions will render information about the exception. If using a browser which supports resource inspection (e.g. Internet Explorer with Internet Explorer Developer Toolbar, Firefox with Firebug), HttpHandler error information will be made available to you. (Without resource inspection, the more detailed error descriptions returned by the RAD PDF HttpHandler are not displayed directly in the browser.)
- Error Catching - RAD PDF's WebControl exposes the RadPdfException class (and its inherited exceptions) which is raised for many RAD PDF specific problems. These exceptions can be handled using try / catch blocks to diagnose WebControl issues related to your RAD PDF configuration in a custom manner.
Additional support for RAD PDF is provided at: http://www.redsoftware.com