IIS configuration: Navigation to the webpage was canceled when converting page to PDF using SautinSoft.PdfVision

☆樱花仙子☆ 提交于 2019-12-24 09:11:59

问题


I am having a problem when trying to convert an ASP .Net page to PDF using SautinSoft.PdfVision. Using this library is quite straight forward, all you need to do is tho provide the URL of the page you want to convert and the PDF destination path.

SautinSoft.PdfVision v = new SautinSoft.PdfVision(); v.ConvertHtmlFileToPDFFile(url, pdfFilePath);

Instead of having the page I ask for to be rendered as PDF, I always get the one saying "Navigation to the webpage was canceled", as if IIS (version 7.5.7600.16385) was redirecting systematically my request. In my development environment (Visual Studio Express 2012 for web, version 11.0.50727.1 RTMREL), I do not have this problem at all. Visual studio uses its own local web server whose configuration is the one by default and it works like a charm. I added some log in the Page_Load event of the page I want to convert and for sure in my prod environment, this event is never triggered since I don't get any logs meaning the page never gets loaded. In my dev environment, my log does confirm that the pages is being loaded.

I have read a lot about this "Navigation webpage canceled" problem but all the answers I could find were about client side configuration, trust level in IE. I am using Chrome and its settings are the same whether I am debugging or hitting the prod server. So my intuition really tells me something is going wrong on the server side.

So does anyone of you know about some IIS configuration that could fix my problem?

Thanks for your help.


回答1:


I also faced similar kind of issues when using sautinsoft PDFVision

Solution:

in iis select your websites---> go to ssl settings --> client certificate --> ignore

this works for me

other chances if above not work:

goto application pool --> advanced settings---> loaduserprofile=true



来源:https://stackoverflow.com/questions/15921978/iis-configuration-navigation-to-the-webpage-was-canceled-when-converting-page-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!