When I execute the report locally, it executes well. But when we published it on the web the report shows the followed error "Error registering the viewer with the service. An error has occurred.Object reference not set to an instance of an object."
Code snippets:
var viewer =
$("#smsReportViewer").telerik_ReportViewer({
serviceUrl: "/api/reports/",
reportSource: {
report: "SMSWebClient.Reports.AccountsReport1, SMSWebClient, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null",
parameters: params
},
viewMode: telerikReportViewer.ViewModes.PRINT_PREVIEW,
scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
scale: 1.0,
ready: function () {
$("#smsReportViewer").css("height", $(document).height() - 200)
checkResizeNeeded();
},
});
Below, the Stack trace
"
at Telerik.Reporting.Cache.CacheStorage.AddInSet(String key, String
value) in
c:\temp\reporting\RBuild-6690\Reporting_Build\Source\Code\Telerik.Reporting.Cache\CacheStorage.cs:line
271
at Telerik.Reporting.Services.Engine.PersistableCollection`1.NewItem(String
newID, Action`1 initializeObject) in
c:\temp\reporting\RBuild-6690\Reporting_Build\Source\Code\Telerik.Reporting.Services.Engine\PersistableCollection.cs:line
30
at Telerik.Reporting.Services.Engine.ReportEngine.RegisterClient() in
c:\temp\reporting\RBuild-6690\Reporting_Build\Source\Code\Telerik.Reporting.Services.Engine\ReportEngine.cs:line
83
at
Telerik.Reporting.Services.WebApi.ReportsControllerBase.RegisterClient() in
c:\temp\reporting\RBuild-6690\Reporting_Build\Source\Code\Telerik.Reporting.Services.WebApi\ReportsControllerBase.cs:line
128
at lambda_method(Closure , Object , Object[] )
at
System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object
instance, Object[] methodParameters)
at
System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object
instance, Object[] arguments)
at
System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext
controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End
of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at
System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End
of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at
System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End
of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at
System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"
Kindly note that we
tried the following (via web config and webapi caching overrides):
- used file based caching
- used memory based caching
- used IsolatedMode in caching
And also reset the security permissions for app pool user and still same issue
occurs.