Sometimes ASHX files are used for sending .PDF files to the user's browser, since the ASHX file has a reference to the PDF document. However, when the file is downloaded, the file extension is not renamed to ".pdf" and remains with the ".ashx" file extension. In this case, you can rename the file extension to ".pdf" and view it with Adobe Reader or another PDF viewer. You can also sometimes fix this problem by making sure that the Web browser has the Adobe Reader plug-in installed. If installed, the PDF file may then open directly in the browser.
NOTE: Many ASHX pages have only a small amount of code, even as short as a single line. Page functions are written in the C# programming language.