iis-7 – Rotativa PDF生成本地工作,但不在IIS 7上
|
我有一个ASP.NET MVC 5应用程序。它有一个简单的形式,当用户提交它时,表单存储在缓存中,然后调用另一个控制器动作,该操作将以PDF的形式返回模型作为视图。 我没有必要在本地保存它,只是在浏览器中显示,以便用户可以下载它。 也不需要数据库,这就是为什么我将模型存储在缓存中。 在本地,在Visual Studio 2013上,它工作正常。但是当我发布到IIS 7时,我会收到一个未处理的执行错误。这是我收回的堆栈跟踪: Unhandled Execution Error Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Exception: Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [Exception] Rotativa.WkhtmltopdfDriver.Convert(String wkhtmltopdfPath,String switches,String html) +1364 Rotativa.WkhtmltopdfDriver.ConvertHtml(String wkhtmltopdfPath,String html) +70 Rotativa.ViewAsPdf.CallTheDriver(ControllerContext context) +1986 Rotativa.AsPdfResultBase.BuildPdf(ControllerContext context) +380 Rotativa.AsPdfResultBase.ExecuteResult(ControllerContext context) +69 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters,Int32 filterIndex,ResultExecutingContext preContext,ControllerContext controllerContext,ActionResult actionResult) +109 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters,ActionResult actionResult) +890 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext,IList`1 filters,ActionResult actionResult) +97 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 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34248 我第一次使用ActionAsPDF(),但是现在我也尝试使用返回新的ViewAsPDF()。两者都提供相同的错误和堆栈跟踪。这是否必须执行某些权限? 解决方法此错误是一个名为(MSVCP120.dll)的Visual Studio 2013文件缺少的C可重新分发包。解决问题: >打开Visual Studio 2013的可下载C包可下载链接如下: 查看Jalal W Hijazi Blog http://jwhijazi.blogspot.com/2015/05/solving-rotativa-unhandled-exception.html了解更多详情。 (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- iis-7 – ASP 3.0应用程序对象
- asp.net – Log4net可以有多个appender写入同一个文件?
- asp.net-mvc-2 – 在调用EditorFor(…)时隐藏公共属性的编辑
- 如何指导获取一个经典的asp应用程序在IIS 7.0下工作
- 如何以编程方式将ListItems添加到ASP.NET中的DropDownList?
- asp.net-mvc – Ajax.BeginForm,调用操作,返回JSON,如何在我
- asp.net-mvc – ASP.NET MVC Intellisense没有找到ViewData
- asp.net – NewRelic – 如何忽略Web应用程序的一部分
- ASP.NET框架中的异步页面 – 其他线程在哪里,如何重新连接?
- IIS反向代理不使用ASP.NET中的Response.Redirect()
- asp.net – 如何在EF DbContext和AspNet Members
- asp.net核心 – aspnetcidev和aspnetvnext之间的
- 如何用Asp.net中的javascript检测IE 11
- IIS是否记录请求标头信息?如果是的话,在哪里?
- 何时使用ASP.NET MVC与ASP.NET Web窗体?
- asp.net-mvc – ValidationMessage – 处理同一属
- ASP.NET MVC的OnResultExecuted方法中的ActionRe
- asp.net – 使用JavaScript重新排列的ListBox元素
- asp.net-mvc – 仅当不使用角色时,如何重定向[Au
- asp.net – 在离开Gridview页面后维护GridView当
