Hi I realise this question has been asked before but I'm stuck for ideas how to get around it. My code is working fine locally but on the server where the site is using windows authentication I'm getting the error:
Exception Details: System.Exception: EO.Pdf.HtmlToPdfException: Failed to convert Url 'http://mysite/mypage.aspx?id=33'.(401:The requested resource requires user authentication. This is an error returned by the Web server, not by the HTML to PDF converter. Please try to visit the same Url with your browser to verify whether the Url is valid.)
at EO.Pdf.Internal.de.a(String A_0, Boolean A_1)
at EO.Pdf.Internal.de.b(HtmlToPdfOptions A_0, String A_1, Boolean A_2)
at EO.Pdf.Internal.de.a(bs A_0)
at EO.Pdf.Internal.lr.c.a(Byte[] A_0)
The URL is fine, I have granted access to all users on the bin folder and url to be converted. My code is:
Code: C#
PdfDocument doc = new PdfDocument();
HtmlToPdf.Options.PageSize = EO.Pdf.PdfPageSizes.A4;
HtmlToPdf.Options.FooterHtmlPosition = 9.8F;
HtmlToPdf.Options.AllowLocalAccess = true;
HtmlToPdf.ConvertUrl(AttachmentUrl, doc);
MemoryStream ms = new MemoryStream();
doc.Save(ms);
Any new ideas or code suggestions would much appreciated.