Rotativa.WkhtmltopdfDriver在执行当前Web请求期间生成了未处理的异常

时间:2018-01-06 13:01:23

标签: c# asp.net-mvc rotativa

我在登台服务器上遇到以下异常:

DotNetNuke.Entities.Users.UserInfo objUser = new 
DotNetNuke.Entities.Users.UserInfo();

//objUser.AffiliateID = Null.NullInteger;

objUser.Email = "hfsdh@gmail.com";
objUser.FirstName = "Test";
objUser.IsSuperUser = false;

//I bet you will not create SuperUsers in bulk ;)

objUser.LastName = "Test1";
// objUser.PortalID = 0;    
objUser.Username = "Test";

objUser.DisplayName = "Test" + " " + "Test1";

//Usually here FirstName+LastName

objUser.Membership.Password = "121";
objUser.Membership.Approved = true;
objUser.Membership.Email = "hfsdh@gmail.com";
objUser.Membership.Username = "Test";
objUser.Membership.PasswordQuestion = "121";

//objUser.Profile.Telephone =Convert.ToString(phone);

objUser.Profile.FirstName = fname;
objUser.Profile.LastName = lname;
objUser.Membership.UpdatePassword = false;

string vSrav = "";

DotNetNuke.Security.Membership.UserCreateStatus objCreateStatus =
DotNetNuke.Entities.Users.UserController.CreateUser(ref objUser);

以下代码在我的本地计算机上正常运行:

   [Exception]
   Rotativa.WkhtmltopdfDriver.Convert(String wkhtmltopdfPath, String switches, String html) +975
   Rotativa.WkhtmltopdfDriver.ConvertHtml(String wkhtmltopdfPath, String switches, String html) +51
   Rotativa.ViewAsPdf.CallTheDriver(ControllerContext context) +1310
   Rotativa.AsPdfResultBase.BuildPdf(ControllerContext context) +250
   Rotativa.AsPdfResultBase.ExecuteResult(ControllerContext context) +66
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +56
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +422
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +52
   System.Web.Mvc.Async.<>c__DisplayClass28.<BeginInvokeAction>
    b__19() +173
    System.Web.Mvc.Async.<>c__DisplayClass1e.<BeginInvokeAction>
    b__1b(IAsyncResult asyncResult) +100
    System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
    System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
    System.Web.Mvc.Controller.<BeginExecuteCore>
        b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
        System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
        System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +54
        System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +41
        System.Web.Mvc.Controller.<BeginExecute>
            b__15(IAsyncResult asyncResult, Controller controller) +12
            System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +28
            System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +54
            System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +31
            System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
            System.Web.Mvc.MvcHandler.<BeginProcessRequest>
                b__4(IAsyncResult asyncResult, ProcessRequestState innerState) +21
                System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
                System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +54
                System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
                System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
                System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9651188
                System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

我尝试了Rotativa PDF generation working locally but not on IIS 7中提到的步骤,但没有帮助。

由于

0 个答案:

没有答案