2016-11-11 1 views
0

HiQPDF를 사용하여 내 페이지를 PDF로 변환하려고합니다. 나는 (로컬 호스트를 통해) 내 로컬 컴퓨터에서 실행하면 코드는 잘 작동하지만 내가 서버에 밀어 경우,이 오류가 나타납니다HTML from URL layout error

HtmlToPdf htmlToPdfConverter = new HtmlToPdf(); 
htmlToPdfConverter.ConvertUrlToFile("https://website.com/12345", filePath); 

: 여기

HTML from URL layout error

몇 가지 예제 코드의를 filePath은 PDF를 작성해야하는 경로입니다. 경로가 정확하고 폴더가 모두 만들어집니다. 내 사이트로 https://website.com/12345으로 갈 때 페이지를 잘 볼 수 있습니다. 시크릿에서도. 단순히 website.comlocalhost으로 바꾸면 로컬로 잘 작동합니다.

오류는 페이지 코드에 문제가 있음을 나타냅니다. 맞습니까? 문제는 무엇이 될 수 있습니까?

답변

0

Azure 웹 앱에서 이것을 사용하고 있습니까? 그렇다면 지원되지 않습니다. Azure를 사용하고 있다면 클라우드 서비스에서 실행중인 웹 역할에 배포해야합니다. 이상한

You can use the HiQPdf library in Windows Azure Cloud Services and Virtual Machines but not in Web Sites because the Web Sites run in a restricted sandbox. Using Visual Studio you can easily transform an existing ASP.NET 4.0 or MVC application into a Web Role by adding a cloud service project to the solution containing your project. For this, open your solution, right click on the ASP.NET project and select the 'Add Windows Azure Cloud Service Project' option from menu. Right click on the added cloud service project and select the 'Package' option to produce a package and a configuration file you can deploy as an Azure Cloud Service.

http://www.hiqpdf.com/FAQs.aspx

+0

흠. 나는 그것에게 웹 사이트에 완전한 길을주고있다. 나는 localhost 같은 것을 사용하지 않는다. 나는 전장을주고있다. HiQPdf의 지원으로 잘 생성 할 수있었습니다. – MortenMoulder