calling GetReportSnapshotResult OUTSIDE of getResultSnapshot
Posted: Tue Nov 19, 2013 7:46 pm
Hi,
I'm wondering if its possible to call
StiMvcViewer.GetReportSnapshotResult(HttpContext, report);
From the controller action method that generates the view with the stimulsoft control on it. My goal is to be able to use the size of the stringData field to generate a dynamic "ConnectionClientRequestTimeout" value (ie, small for smallish datasets, and large, for larger ones).
Right now, I have some clients with enormous datasets, pulling an entire months worth of data, and it hits my ConnectionClientRequestTimeout limit, while my smaller clients can pull 3 years worth of data without concern. I'd like to be able to tailor the ConnectionClientRequestTimeout to the specific report they are generating.
However, when I try the above, I get a "yellow screen of death", as follows shortly. The exact same line of code operates without issue in the GetReportSnapshot() action. Additionally, both the HttpContext and the report objects are in existence, and both appear to be reasonably setup. My only guess is that GetReportSnapshot() somehow has additional info in the HttpContext that is missing from the Primary action method's.
============================================================================
Server Error in '/Portal' Application.
Value cannot be null.
Parameter name: value
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.ArgumentNullException: Value cannot be null.
Parameter name: value
Source Error:
Line 295:
Line 296:
Line 297: var doc = StiMvcViewer.GetReportSnapshotResult(httpCtx, report);
Line 298:
Line 299: //find the size of the report
Source File: C:\Work\Webstore\ws_trunk\tmpFlex_RenameMe\RevTrakPortal\RevTrakPortal\Controllers\ReportController.cs Line: 297
Stack Trace:
[ArgumentNullException: Value cannot be null.
Parameter name: value]
System.EnumResult.SetFailure(ParseFailureKind failure, String failureParameter) +4058055
System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult) +9627263
System.Enum.Parse(Type enumType, String value, Boolean ignoreCase) +80
Stimulsoft.Report.Mvc.StiMvcViewer.SaveReportObject(HttpContextBase httpContext, StiReport report) +94
Stimulsoft.Report.Mvc.StiMvcViewer.GetReportSnapshotResult(HttpContextBase httpContext, StiReport report) +18
RevTrakPortal.Controllers.ReportController.Render(Int32 id, Boolean edit, Boolean dup) in C:\Work\Webstore\ws_trunk\tmpFlex_RenameMe\RevTrakPortal\RevTrakPortal\Controllers\ReportController.cs:297
lambda_method(Closure , ControllerBase , Object[] ) +194
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +205
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +50
System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +58
System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +237
System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +237
System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +50
System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +126
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +45
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +61
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +49
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +49
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9042429
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
I'm wondering if its possible to call
StiMvcViewer.GetReportSnapshotResult(HttpContext, report);
From the controller action method that generates the view with the stimulsoft control on it. My goal is to be able to use the size of the stringData field to generate a dynamic "ConnectionClientRequestTimeout" value (ie, small for smallish datasets, and large, for larger ones).
Right now, I have some clients with enormous datasets, pulling an entire months worth of data, and it hits my ConnectionClientRequestTimeout limit, while my smaller clients can pull 3 years worth of data without concern. I'd like to be able to tailor the ConnectionClientRequestTimeout to the specific report they are generating.
However, when I try the above, I get a "yellow screen of death", as follows shortly. The exact same line of code operates without issue in the GetReportSnapshot() action. Additionally, both the HttpContext and the report objects are in existence, and both appear to be reasonably setup. My only guess is that GetReportSnapshot() somehow has additional info in the HttpContext that is missing from the Primary action method's.
============================================================================
Server Error in '/Portal' Application.
Value cannot be null.
Parameter name: value
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.ArgumentNullException: Value cannot be null.
Parameter name: value
Source Error:
Line 295:
Line 296:
Line 297: var doc = StiMvcViewer.GetReportSnapshotResult(httpCtx, report);
Line 298:
Line 299: //find the size of the report
Source File: C:\Work\Webstore\ws_trunk\tmpFlex_RenameMe\RevTrakPortal\RevTrakPortal\Controllers\ReportController.cs Line: 297
Stack Trace:
[ArgumentNullException: Value cannot be null.
Parameter name: value]
System.EnumResult.SetFailure(ParseFailureKind failure, String failureParameter) +4058055
System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult) +9627263
System.Enum.Parse(Type enumType, String value, Boolean ignoreCase) +80
Stimulsoft.Report.Mvc.StiMvcViewer.SaveReportObject(HttpContextBase httpContext, StiReport report) +94
Stimulsoft.Report.Mvc.StiMvcViewer.GetReportSnapshotResult(HttpContextBase httpContext, StiReport report) +18
RevTrakPortal.Controllers.ReportController.Render(Int32 id, Boolean edit, Boolean dup) in C:\Work\Webstore\ws_trunk\tmpFlex_RenameMe\RevTrakPortal\RevTrakPortal\Controllers\ReportController.cs:297
lambda_method(Closure , ControllerBase , Object[] ) +194
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +205
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +50
System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +58
System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +237
System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +237
System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +50
System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +126
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +45
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +61
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +49
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +49
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9042429
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184