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

Disable Cache Server Side (ASP.net MVC ReportViewer)

8 Answers 229 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
N M Reddy
Top achievements
Rank 1
N M Reddy asked on 12 Sep 2015, 06:22 PM

Hi,

I am using Telerik Reporting Q2 2015 with ASP.net MVC ReportViewer (UI for ASP.net MVC). In this I am not able to disable cache at server side, can you please share the option to disable cache from both client & server side.

 This will help me to pull the report every time from database & share the update data in the report.

 

-thank you

-nm

8 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 14 Sep 2015, 08:43 AM
Hi NM,

Please upgrade to Telerik Reporting Q3 2015 SP1 v9.1.15.731, and test the settings elaborated in Cache Management: HTML5 Viewer and Reporting REST services.

I hope this 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
0
N M Reddy
Top achievements
Rank 1
answered on 14 Sep 2015, 09:36 AM

Hi Stef,

I have configured Telerik.Reporting section in this way, unfortunately this is not working. Can you please help me to correct the configuration to clear Cache.

<section name="Telerik.Reporting" type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting, Version=9.1.15.731, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" allowLocation="true" allowDefinition="Everywhere"/>​

  <Telerik.Reporting>
    <restReportService reportSharingTimeout="0" clientSessionTimeout="0">
      <reportResolver provider="type" />
      <storage provider="file" />
    </restReportService>
    <Cache provider="File"  reportSharingTimeout="0" clientSessionTimeout="0">
      <Providers>
        <Provider name="File">          
        </Provider>
      </Providers>
    </Cache>
  </Telerik.Reporting>

 

thank you

-nm

0
Nasko
Telerik team
answered on 14 Sep 2015, 11:08 AM
Hello Nm,

To configure the Telerik Reporting REST service from the application configuration file, set the value of the ReportServiceConfiguration property to an instance of the ConfigSectionReportServiceConfiguration class, as described in the How To: Implement the ReportsController in an application help article:
public class ReportsController : ReportsControllerBase
{
    static Telerik.Reporting.Services.ConfigSectionReportServiceConfiguration configSectionConfigurationInstance =
        new Telerik.Reporting.Services.ConfigSectionReportServiceConfiguration();
 
    public ReportsController()
    {
        this.ReportServiceConfiguration = configSectionConfigurationInstance;
    }
}

These configuration options are described in the restReportService Element help article. Note that clientSessionTimeout="0" is not a valid configuration value, since the ClientSessionTimeout must be greater than 0.
The Cache Element applies only to the report viewers listed in the Cache Management Overview article and is not needed in your scenario.

Regards,
Nasko
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
N M Reddy
Top achievements
Rank 1
answered on 14 Sep 2015, 12:30 PM

Thank you Nasko.

as per documentation (clientSessionTimeout):

Gets or sets a value in minutes indicating how long a client session will be preserved in the service storage after the last interaction from this client.
The value must be greater than zero

If client is interacting with server frequently, I don't see the ​scope to refresh report with updated data. Is there any option to disable Cache completely from the Report Viewer side & Server side.

 

thank  you

-nm

0
Accepted
Nasko
Telerik team
answered on 14 Sep 2015, 12:42 PM
Hello Nm,

The ReportSharingTimeout property gets or sets a value in minutes indicating how long a rendered report document from a client will be available for reuse, including for reuse by other clients' requests. When a report is rendered once with a given set of report parameter values, it can be reused for the time set as ReportSharingTimeout. Setting the ReportSharingTimeout to zero will cause each client request for a report to produce a new report document instead of reusing the already cached documents.

Regards,
Nasko
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
N M Reddy
Top achievements
Rank 1
answered on 14 Sep 2015, 01:10 PM
Thank you Nasko.
0
prakash
Top achievements
Rank 1
answered on 15 Sep 2017, 11:59 AM

I have apply the below code 

 public ReportsController()
        {
            configSectionConfigurationInstance.ReportSharingTimeout = 0;
            configSectionConfigurationInstance.ClientSessionTimeout = 0;
            configSectionConfigurationInstance.Storage = new FileStorage();
            configSectionConfigurationInstance.ReportResolver=new CustomReportResolver();
            this.ReportServiceConfiguration = configSectionConfigurationInstance;
            
        }

I have set  the ReportSharingTimeout=0 ,ClientSessionTimeout=0 But still report viewer still load previous report on click report viewer navigation back button

Scenario : I have two reports 1 Report A and Report B if a open Report A then open Report B  then navigation button becomes clickable which shouldn't be (because i am opening  a new report )  and when click on respective navigation back  button it take me to   Report A .

Please let me know how should i don't allow navigation button to load previous report until respective report  have any navigation report associated with it 

 

0
Katia
Telerik team
answered on 20 Sep 2017, 10:36 AM
Hi prakash,

I am not sure about the exact scenario. Do you navigate to ReportB from ReportA using the Navigate to Report action?
Note that ClientSessionTimeout property of the service cannot be 0, it should be a greater than 0.


Regards,
Katia
Progress 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
N M Reddy
Top achievements
Rank 1
Answers by
Stef
Telerik team
N M Reddy
Top achievements
Rank 1
Nasko
Telerik team
prakash
Top achievements
Rank 1
Katia
Telerik team
Share this question
or