This is a migrated thread and some comments may be shown as answers.
Error after publishing the report on the server
1 Answer 101 Views
This is a migrated thread and some comments may be shown as answers.
TrueSteps
Top achievements
Rank 1
TrueSteps asked on 03 Jul 2016, 07:55 PM

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.

I attached the error message

1 Answer, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 06 Jul 2016, 01:44 PM
Hello TS,

I believe this issue is related to the one described in a support ticket#1047757 opened by you so we can continue our discussion in the ticket.

For other community members, interested in this topic below is the reply from the support ticket:

"This error means that the REST Service might not be implemented correctly or is not found by the report viewer client. 
Please review How To: Use HTML5 ASP.NET MVC Report Viewer in an application and How To: Add Telerik Reporting REST Web API to Web Application help articles and check if everything is implemented correctly on your end.

You can also find sample implementations of the viewer and the service in the Telerik Examples folder: <installation folder>\Telerik\Reporting <version>\Examples"


Regards,
Katia
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
TrueSteps
Top achievements
Rank 1
Answers by
Katia
Telerik team
Share this question
or