I have a 6.0 webapi app running on azure that's been running fine for well over a year. Just today, SelectPDF started throwing this error on most of my controller methods that call it to convert html (generated from a razor view) into a pdf file. That has all been working fine for a while now. it still works on my local machine fine but fails in my azure web app. I have not made any config changes to the web app in a while (runs under 6.0 core). I'm using Select PDF version 21.0
Here's the error being thrown by the call to the converter.
,Message = Conversion error: Navigation timeout.,Stack Trace = at SelectPdf.HtmlToImage.?(String A_0, String A_1, String A_2, ?& A_3, String& A_4) at SelectPdf.HtmlToPdf.?(String A_0, String A_1, String A_2, String A_3, Boolean A_4) at SelectPdf.HtmlToPdf.ConvertHtmlString(String htmlString, String baseUrl) at AL.WebAPI.Controllers.FloorPlanDiagramController.PrintStandardFloorPlanDiagramsByPlanId(Int32 planId) in C:\Projects\AL-WEBAPI\al-webapi\AL.WebAPI\Controllers\FloorPlanDiagramController.cs:line 559,Source = Select.Pdf
I have a 6.0 webapi app running on azure that's been running fine for well over a year. Just today, SelectPDF started throwing this error on most of my controller methods that call it to convert html (generated from a razor view) into a pdf file. That has all been working fine for a while now. it still works on my local machine fine but fails in my azure web app. I have not made any config changes to the web app in a while (runs under 6.0 core). I'm using Select PDF version 21.0
Here's the error being thrown by the call to the converter.
,Message = Conversion error: Navigation timeout.,Stack Trace = at SelectPdf.HtmlToImage.?(String A_0, String A_1, String A_2, ?& A_3, String& A_4) at SelectPdf.HtmlToPdf.?(String A_0, String A_1, String A_2, String A_3, Boolean A_4) at SelectPdf.HtmlToPdf.ConvertHtmlString(String htmlString, String baseUrl) at AL.WebAPI.Controllers.FloorPlanDiagramController.PrintStandardFloorPlanDiagramsByPlanId(Int32 planId) in C:\Projects\AL-WEBAPI\al-webapi\AL.WebAPI\Controllers\FloorPlanDiagramController.cs:line 559,Source = Select.Pdf
Share asked Mar 14 at 22:00 elitzelitz 713 bronze badges1 Answer
Reset to default 0this turned out to be an issue with my mvc razore view _layout.cshtml file that was being used to render my html (which was then being passed to selectpdf). Several <script> tags were referencing web sites and cdn locations that apparently are no longer available, thus causing the html rendering to fail within selectpdf. Once i removed those script tags, everything started working again...thanks.