This is a migrated thread and some comments may be shown as answers.

HTML 5 Report Viewer Error creating report document:Client with ID not found. Expired

15 Answers 730 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
systems
Top achievements
Rank 1
systems asked on 27 Apr 2015, 12:40 PM
Hi, 
We have migrated from Asp.Net Web Report viewer to HTML5 Report viewer recently and facing trouble with  “HTML5 Report Viewer” on Production Load balanced servers. (On Single hosted server everything works smoothly) 

1. We have Asp.Net Web application (Not MVC App) with 3 tier arch. WCF Services are getting used to serve reporting data.
2. Ours is Session less app, so in Web.Config we have set <sessionState mode="Off">
3. As a part of migrating to HTML5 Report viewer, we only replaced Asp Web Report Viewer with HTML5 report viewer,
     keeping Web Project, Telerik reporting cs files as it is. ( so technically only HTML5 Report viewer is being used with Asp.Net Web app). 

This setup works well in DEV/QA (Single Server env). However when we deployed to UAT/PROD (Load Balanced env with 2 servers) the report viewer throws 
below error randomly but quite frequently. 

Error creating report document (Report = Hotel.H_Reservation_Report, Enterprise.Reports; Format = HTML5Interactive): Client with ID '201112-bb07' not found. Expired.

It looks to me some caching related error as it says "Expired". Any idea how to get rid of this in particular to multiple server installation?
Appreciate any quick help on this.

Thanks,

Chetan

15 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 29 Apr 2015, 12:35 PM
Hi Chetan,

Please check the REST Service Storage article and test switching to an IStorage implementation for handling the cache in the Reporting REST service.

I hope the provided information is helpful.

Regards,
Stef
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
systems
Top achievements
Rank 1
answered on 30 Apr 2015, 03:49 AM

Thank you Stef for your reply, It did gave us a right direction.

Couple of suggestions if you can provide -

In our case, where App scope is spread over Internet/Intranet -

1. Do you recommend any specific IStorage mechanism (MsSQL / Redis )

2. Is there any sample for MsSQL configuration with Existing Reporting services, I don't see one on any resources available.

It would be good if we can get to see any existing sample implementation of MsSQL as IStorage provider in order to configure at our end. 

Thanks,

Chetan

0
Stef
Telerik team
answered on 30 Apr 2015, 01:09 PM
Hi Chetan,

The available options are for your convenience. If you do not have any specififc requirements, test using the MsSqlServerStorage. The settings for adding it are listed in How To: Configure MS Sql database storage. Due to the differences in the SQL scripts in versions, please use the local help (CHM) file for the used by you Telerik Reporting version.

To use the MsSqlServerStorage you need to:
  1. Create the required tables and stored procedures on MSSQL Server only once - SQL scripts. The same can be done by our Dtabase Cache Configurator if you have access to the server machine;
  2. Configure the service to use the created database and tables:
    protected override Telerik.Reporting.Cache.Interfaces.IStorage CreateStorage()
         {
             return new Telerik.Reporting.Cache.MsSqlServerStorage("connectionString string here");
         }
    the above linked will be called frequently on interaction with the viewer and the report in it. The method must be used only to configure the proxy.


Regards,
Stef
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
systems
Top achievements
Rank 1
answered on 04 May 2015, 06:15 AM

Thanks a lot for your reply Stef.

We are using Telerik Reporting Q1 2014 (Version 8.0.14.225) and I don't see any such Interface named Interfaces.IStorage. 

Switching to Q1 2015 is not an option as of now. So is there any other interface i can deal with Q1 2014 version. 

We need to somehow get the HTML5 Reporting work smoothly in load balanced environment.

Looking fwd to your reply.

Thanks,

Chetan

0
Stef
Telerik team
answered on 04 May 2015, 06:26 AM
Hi Chetan,

The IStorage option is introduced in Telerik Reporting Q3 2014.

In Q1 2014 the only option is to use the Reporting REST service with ICache which requires you to host the service as a single instance for the whole application. For the purpose you can separate the service in its own project and enable CORS, if needed. Then all viewer will communicate with that instance of the service, and requests will be handled by the service sequentially (with waiting).

For more details check the REST Service Storage article.

Regards,
Stef
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
systems
Top achievements
Rank 1
answered on 05 May 2015, 08:58 AM

Hi Stef,

I have downloaded the Q3 2014 version and now I can use the IStorage Interface. 

However, we would like to keep it configurable i.e For Single server deployment use ICache and for Load balanced use IStorage interface.

Is there a way i can switch bet these methods based on flag(StorageMode) from web.config. I tried but it seems i can use any one of these two methods in my ReportController class. 

public class ReportsController : ReportsControllerBase
   {
    // Switch to set ICache or IStorage from config
   Boolean LoadBalancerEnabled = Convert.ToBoolean(Common.CustomAppSettingManager.GetAppValueByKey(Common.Constatns.CUSTOM_APP_SETTING_LOADBALANCER));         
 
      protected override IReportResolver CreateReportResolver()
      {
          return new ReportFileResolver()
              .AddFallbackResolver(new ReportTypeResolver());
      }
      //Call this in case of Single server deployment
      protected override ICache CreateCache()
      {
                 return Telerik.Reporting.Services.Engine.CacheFactory.CreateFileCache();
            }
 
   //Call this in case of Load Balanced env deployment
      protected override Telerik.Reporting.Cache.Interfaces.IStorage CreateStorage()
       {
           return new Telerik.Reporting.Cache.MsSqlServerStorage(Common.ConnectionStringManager.GetConnectionString);
       }
 
     
   }

0
Stef
Telerik team
answered on 07 May 2015, 11:58 AM
Hello,

With the available to you Telerik Reporting versions the Reporting REST service must be configured in code to use ICache or IStorage implementation.

In the current Q 2015 SP1 internal build 9.0.15.422 is included an option for controlling the cache storage and client session timeout (the life span per report resources on the server).

In future releases we plan to provide option to specify the cache storage through the application's configuration file.

Regards,
Stef
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
systems
Top achievements
Rank 1
answered on 12 Aug 2015, 06:15 AM

Hi Stef,

Wish to follow up on this thread again. May I know if the latest reporting version supports Load Balancing environment to tackle this cache storage case. Or Kindly suggest which version supports Load Balancing and how to configure.

As you know already our app is still facing this issue due to load balances, we wish to see any open options for us to get over it.

pls suggest at the earliest.

Thanks,

Chetan

0
Stef
Telerik team
answered on 12 Aug 2015, 03:56 PM
Hi Chetan,

The mentioned settings for the Reporting RESt service cache are available in the latest Telerik Reporting Q2 2015 SP1 v9.1.15.731 release - HTML5 Report Viewer and Reporting REST services cache management.

About deploying the application in a web farm, you will have to use an IStorage implementation as a storage - REST Service Storage.

Regards,
Stef
Telerik
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
0
systems
Top achievements
Rank 1
answered on 13 Aug 2015, 06:16 AM

Thank you for your reply Stef.

Unfortunately we do not wish to opt for IStorage option to have more load on transnational DB. We already tried on Version- 9.1.15.731 to check if it offers any additional configurations towards load balancing setup but it seems there is no changes in this version too to handle cache management for load balancing.

We tried below - 

public class ReportsController : ReportsControllerBase
    {
        static ReportServiceConfiguration configurationInstance;
 
        static ReportsController()
        {
            var resolver = new ReportFileResolver()
                .AddFallbackResolver(new ReportTypeResolver());
 
            configurationInstance = new ReportServiceConfiguration
            {
                HostAppId = "DataCache",
                Storage = new FileStorage(),
                ReportResolver = resolver,
                // ReportSharingTimeout = 0,
                // ClientSessionTimeout = 15,
            };
        }
 
        public ReportsController()
        {
            this.ReportServiceConfiguration = configurationInstance;
        }
}

It still persist the issue of "Client ID not found. Expired". Any possibilities that we can manage without IStorage provider in our case?

Thanks,

Chetan

0
Stef
Telerik team
answered on 13 Aug 2015, 08:28 AM
Hi Chetan,

In your code snippet the service's Storage still uses ICache (FileStorage). Instead you need an inastance of the MsSqlServerStorage. For example:
static ReportsController()
        {
            var resolver = new ReportFileResolver()
                .AddFallbackResolver(new ReportTypeResolver());
  
            configurationInstance = new ReportServiceConfiguration
            {
                HostAppId = "DataCache",
                Storage = new MsSqlServerStorage("connection string here"),
                ReportResolver = resolver,
                // ReportSharingTimeout = 0,
                // ClientSessionTimeout = 15,
            };
        }


Regards,
Stef
Telerik
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
0
systems
Top achievements
Rank 1
answered on 13 Aug 2015, 12:46 PM

Stef, The point is we don't want to switch to iStorage provider as it creates additional load on database side.

I feel there should be a configuration to switch for load balancing setup in case of ICache Implementation as well? 

Is there any way to workaround now for ICache in our load balancing scenario?

Any thoughts?

Chetan

0
Stef
Telerik team
answered on 17 Aug 2015, 11:06 AM
Hi Chetan,

The ICache is designed to work only if the service is hosted on a single instance. You can separate the ReportsCobntrollerBase in its own project and hosted it on a single instance. Viewers can be added in other application hosted in a web farm, where you may need to enable CORS to allow the communication between the viewers and the service.


If you want to try the IStorage, there is also Redis option beside the MsSqlServerStorage - REST Service Storage.. Note that in the case of the MsSqlServerStorage is recommended to use a separate database due to the frequent queries to the database.

Regards,
Stef
Telerik
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
0
systems
Top achievements
Rank 1
answered on 22 Sep 2015, 05:53 AM

Hi Stef, Greetings again! 

We are currently doing a dirty workaround (as we don't see an option to switch between the providers).

We are maintaining 2 different DLLs for ReportingControllers one with ICache and other with IStorage .

We are thinking to use them as - for Single server deployment use ICache dll and for Web Farm use IStorage dll.

Wish we could have switch to toggle the provider w/o changing the deployment package.

Thanks,

Chetan

0
Stef
Telerik team
answered on 24 Sep 2015, 02:31 PM
Hi Chetan,

You can use two similar ReportsControllerBase implementations, where each will use different cache storage. Then to deploy an application it will be enough to make viewers communicate with the Reporting REST service configured properly for the type of hosting.

Also an option is to configure the Reporting REST Service through the application's configuration file - restReportService Element. For the purpose you will have to add Telerik Reporting Configuration Section.
You will need Telerik Reporting Q2 2015 SP1 v9.1.15.731.

I hope this suggestion helps you.

Regards,
Stef
Telerik
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
Tags
General Discussions
Asked by
systems
Top achievements
Rank 1
Answers by
Stef
Telerik team
systems
Top achievements
Rank 1
Share this question
or