Pdf Viewer net service » History » Version 1
Wil van Antwerpen, 09/06/2022 11:52 AM
| 1 | 1 | Wil van Antwerpen | # Pdf Viewer net service |
|---|---|---|---|
| 2 | |||
| 3 | This is in principle the .net code we are using: |
||
| 4 | https://ej2.syncfusion.com/javascript/documentation/pdfviewer/how-to/create-pdfviewer-service/ |
||
| 5 | |||
| 6 | It’s a bit tweaked to be more up to date in regards to the VS version and that page there doesn’t have the latest .cs code. |
||
| 7 | |||
| 8 | It’s early days, so not much functionality beyond displaying a pdf and clearing the viewer. |
||
| 9 | |||
| 10 | You can download the compiled version of the .net pdf service from the Files tab above (we will supply the .net source code later on as well) |
||
| 11 | |||
| 12 | The folder above is the .net webservice. It also has a bunch of pdf’s in the Data subfolder. |
||
| 13 | Please note this zip contains .dll files and other binaries. So you will have to use “Unblock” in the zip file properties in order to be able to use it. |
||
| 14 | |||
| 15 | The way to setup this webservice is: |
||
| 16 | • Unzip it in a folder that IIS can use (so not under Program Files, but in a location easily accessible from your webapp) |
||
| 17 | • Keep the folder name sfWebPdfViewer |
||
| 18 | • Create an IIS app for that by pointing to it in IIS (New Application -> C:\whereever\the\folder\lives\sfWebPdfViewer ) |
||
| 19 | • Give it the application name “sfWebPdfViewer” |
||
| 20 | • Browse to that folder ( eg. http://localhost/sfWebPdfViewer ) |
||
| 21 | • If all is well then you get to see the pdf viewer rendering a pdf. (I put a simple index.html demo in the same folder, so you can test the setup) |
||
| 22 | • If not, reply with the error you’re seeing. |
||
| 23 | • First thing to try is to rename/delete the x86 folder .. seems like the web service created that itself and I left it in the zip for now. |
||
| 24 | |||
| 25 | |||
| 26 | Once that works… the next thing is to download the updated demo workspace and try it in the demo. |
||
| 27 | |||
| 28 | If you get the following error: |
||
| 29 | |||
| 30 | HTTP Error 500.19 - Internal Server Error |
||
| 31 | |||
| 32 | The requested page cannot be accessed because the related configuration data for the page is invalid. |
||
| 33 | |||
| 34 | Error code: 0x80070021 |
||
| 35 | |||
| 36 | Error data: The configuration cannot be used at this path. This happens when a section is locked at the parent level. Blah blah blah |
||
| 37 | |||
| 38 | Then you're seeing this error because .net support has not been added to your server yet. |
||
| 39 | |||
| 40 | Add Windows features: |
||
| 41 | |||
| 42 | -> IIS -> Application Development |
||
| 43 | * .NET Extensibility 4.7 |
||
| 44 | * ASP.NET 4.7 |
||
| 45 | |||
| 46 | This needs to be ASP.net 4.5 or higher. |
||
| 47 | |||
| 48 | Without any of that you can't run a .net website. |