I'm receiving an error when I click on a link to a PDF that's being generated by a web service. I don't know exactly how the web service is building the file other than the fact that I'm passing in the output path as a parameter:
Dim strPDF As String = Server.MapPath("~") & "\PDFs\" obj.callService(strPDF)
I'd like to provide the user with a clickable link to the PDF. Originally, I received an error when calling the web service saying
Access to the path is denied. After Googling around, I read to add Full Control permission to the folder for NETWORK USER. I did so and now the web service creates the PDF just fine.
When I create the link to the file and click on it in the browser, I receive an error.
The connection was reset
This page can’t be displayed
Googling the error I got in Chrome takes me to a million and one suggestions about increasing request timeout length due to handling large files but none of the PDFs I've tried to create and access are larger than 175KB and most have been around 65KB. Also, I'm getting the error right away making me think it isn't even trying to serve the file.
Can anyone help me figure out what I'm doing wrong?
EDIT: It's also worth noting that everything works fine locally. The error started when I pushed everything to the server.
EDIT2: I added a .tif image file in the same folder to see what would happen and when I try to access the file in the browser, it downloads the file just fine. It doesn't display it in the browser like the PDF would, but downloads to my Downloads folder. Does that mean there's something wrong with the PDF? Or does that mean there's an issue displaying the content in the browser but not downloading to the machine?