2016-06-14 12 views
1

Irotativa nicht Kopf- oder Fußzeile auf SSL dient

 string customSwitches = string.Format("--header-html \"{0}\" " + 
         "--header-spacing \"0\" " + 
         "--footer-html \"{1}\" " + 
         "--footer-spacing \"10\" " + 
         "--footer-font-size \"10\" " + 
         "--header-font-size \"10\" , Url.Action("xxx", "xxxx", new { hid = xxxx.ID }, httType), Url.Action("Footer", "xxxxx", new { hid = xxxxx.ID }, httType)); 

    var actionResult = new Rotativa.ViewAsPdf("Letter") 
     { 
      FileName = gid.ToString(), 
      CustomSwitches = customSwitches 
     }; 

bin mit dem großen lokal arbeitet und testen, aber sobald ich es auf Live setzen (mit SSL) fällt mit dem folgenden Fehler auf: -

System.Exception: 
Error: Failed loading page https://xxxxxxxxx/xxxxxxxx/header?hid=0 (sometimes it will work just to ignore this error with --load-error-handling ignore) Error: Failed loading page https://134.213.201.226/Discharge/Footer?hid=0 (sometimes it will work just to ignore this error with --load-error-handling ignore) Exit with code 1 due to network error: UnknownNetworkError 

System.Exception: Error: Failed loading page https://xxxxxxx/xxxxxxxx/header?hid=0 (sometimes it will work just to ignore this error with --load-error-handling ignore) 
Error: Failed loading page https://xxxxxxxxxx/xxxxxxxxx/Footer?hid=0 (sometimes it will work just to ignore this error with --load-error-handling ignore) 
Exit with code 1 due to network error: UnknownNetworkError 
at Rotativa.WkhtmltopdfDriver.Convert(String wkhtmltopdfPath, String switches, String html) 
    at Rotativa.WkhtmltopdfDriver.ConvertHtml(String wkhtmltopdfPath, String switches, String html) 
    at Rotativa.ViewAsPdf.CallTheDriver(ControllerContext context) 
    at Rotativa.AsPdfResultBase.BuildPdf(ControllerContext context) 

eine Idee, warum die Kopf- und Fußzeile auf Live nicht rendern? Wenn ich über den Browser zur Kopf- und Fußzeile navigiere, rendern sie auf der Seite.

+0

um eine weitere Wendung hinzuzufügen, wenn auf dem Live-Server, wird auch die PDF gerendert werden – chris

Antwort

0

Sie haben folgende DLL in Ihrem Web-App in dem "rotativa" -Ordner: (ich glaube, Sie haben es schon mit "wkhtmltopdf.exe" Datei)

msvcp120.dll, msvcr120.dll , vccorlib120.dll.

Diese Dateien befinden sich in "C: \ Windows \ SysWOW64".

1

Ich denke, es ist ein internes Problem mit Rotativa. Dies ist jedoch eine Art, mit der sich mein Kollege als Work around auskennt.

Auf dem Server gehen, in C: \ Windows \ System32 \ drivers \ etc

Datei öffnen 'hosts'

Beitrag Server-IP von Ihrem Hostnamen. Zum Beispiel: 127.0.0.1 www.stackoverflow.com

Verwandte Themen