Free Support Forum -

Save PDF problem using Windows Integrated Security


I am trying to save a pdf created on an ASP.Net web site using iis 5.1:

Pdf pdfDoc = new Pdf();



...this works fine with anonymous access enabled but I get the following error when I use windows integrated security.

The remote server returned an error: (401) Unauthorized.

...I have tried giving the logged in user access to to the relevant directory but to no avail.

Is there any way I can give the default credentials to the pdf object? - or am I barking up the wrong tree?



Dear Dan,

Thank you for considering Aspose.

I think this is a server security setting issue. Please try creating file with FileStream and see if it work.

ok... I tried that and the strange thing is that I get the 401 Access denied error when I save to the stream!

System.IO.MemoryStream memStream = new System.IO.MemoryStream();

pdfDoc.Save(memStream); //--this is throwing the error!

Do you know why this is happening?



1) Please test file stream directly without using Aspose.Pdf.

2) Provide the complete code and let us check it.


I have solved the problem. The problem was caused by incorrect permissions for the folder containing the css files that were referenced by the HTML that in turn was bound to the pdf!

Its all working fine now, thanks for you help