1

我有一个运行同一站点的多个版本的网络服务器。现场工作正常。测试站点抛出“检测到未经测试的 Windows 6.2 版!” 尝试生成 PDF 时出错。将 Rotativa 文件夹从工作现场复制到测试站点没有帮助。升级到更新版本的 Rotativa 会给我带来其他问题,这些问题现在不在列表中(我们实际上正在考虑放弃它)。

我觉得它与代码无关,但与权限有关,但我找不到任何方法让它工作。为了完整起见,这里是堆栈:

[Exception: Qt: Untested Windows version 6.2 detected!
Error: Failed loading page http://test.mysite.com/Home/PrintBackorderView (sometimes it will work just to ignore this error with --load-error-handling ignore)
]
   Rotativa.WkhtmltopdfDriver.Convert(String wkhtmltopdfPath, String switches, String html) +793
   Rotativa.AsPdfResultBase.CallTheDriver(ControllerContext context) +31
   Rotativa.AsPdfResultBase.BuildPdf(ControllerContext context) +186
   Web.Application.Controllers.HomeController.AddBackordersToPDF(PdfDocument pdfDocument) +188
   Web.Application.Controllers.HomeController.Process() +2681
   lambda_method(Closure , ControllerBase , Object[] ) +79
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +242
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +12
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +139
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +112
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +452
   System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +15
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +37
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +241
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +19
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +51
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
4

1 回答 1

0

Rotativa 是旧诺基亚浏览器的一种包装器,它加载您创建的页面并将其呈现为 PDF。显然这个软件有时需要一些帮助来解析它需要解析的内容的地址,所以我将域添加到 HOSTS 文件中。

http://support.hostgator.com/articles/general-help/technical/how-do-i-change-my-hosts-file

# this should contain the URLs it needs to use
123.45.67.89 www.example.com
于 2015-08-07T13:06:58.663 回答