Access to the path is denied when loading file from other server

Dear suppor team,
I’m using GemBox.Pdf dll with the license.
And I want to load a pdf file from other server to sign content.
But i have an issue with code “using (var document = PdfDocument.Load(pathSource))”
Error message: ‘Access to the path ‘\\ipadress\folder\20221129638053134577030172.pdf’ is denied.’
“ipadress” is ip of that server.
I want to deploy code in Linux.
The file still exists on that server.
Please help me any solution.

Hi Thiên,

It seems like the machine that is running your code doesn’t have access to that file.
Try reading your file into a MemoryStream and then you can pass that stream into the PdfDocument.Load method.


1 Like