Rank: Newbie Groups: Member
Joined: 6/3/2015 Posts: 1
|
Hi,
When i am trying to create a pdf using "HtmlToPdf.ConvertUrl" code at that time it will generate pdf with 401 error.However,i m giving all rights to the folder to generate pdf in production server,and it's successfully working on my test enviornment. In my production server 401 error occur occasionally not consistent, is there any specific reason behind it for not generating the pdf. Please let me know how i can resolve this error.
Below is my code:
PdfDocument doc = new PdfDocument(); string baseURL = Convert.ToString(ConfigurationManager.AppSettings["BaseURL"]);
HtmlToPdf.ConvertUrl(baseURL + "Quote/QuoteHome/PublishQuote" + "?quoteNumber=" + qno + "&printOption=1&cachKey=" + cachKey + "&CatalogPartSelected=" + (Request.QueryString["CatalogPartSelected"] ?? "0").ToString(), doc, htp);
I m also trying to read your other blog regarding 401 error and trying to do all steps which was mentioned but not working in my case. Please give me solution ASAP because due to this i m not able to live my project.
Thanks, Sanket
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
This is an "unauthorized" error. You must check your server to find out why it gives you this error. We have no way of telling you why your server refuses to serve that request.
Thanks!
|