This is a migrated thread and some comments may be shown as answers.
Report is unavailable or session has expired. Load balancing in round robin issue?
6 Answers 200 Views
This is a migrated thread and some comments may be shown as answers.
Warren
Top achievements
Rank 2
Warren asked on 23 Mar 2009, 02:45 PM
On occasion our report viewer will receive a "Report is unavailable or session has expired." when opened in a new window on an ASP.NET 2.0 application.  This started when pushed to our production environment which is load balanced using round robin.  Production is also HTTPS.  Also, the images on the report never show.  Everything worked great on our test server which is not load balanced and is not HTTPS.

Any help is greatly appreciated.

Thanks,

Warren

6 Answers, 1 is accepted

Sort by
0
Accepted
Chavdar
Telerik team
answered on 24 Mar 2009, 09:30 AM
Hi Warren Reinke,

Currently Telerik Reporting uses the ASP.NET Session in order to store resources such as the html pages and images of the report. In case you are using a web farm it is necessary that the session of the web applications is configured as SQLServer or StateServer so that it can be common for all applications. Most probably this should solve the experienced problems.

Regards,
Chavdar
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Nurali
Top achievements
Rank 1
answered on 05 Jun 2013, 06:38 PM
Hello,
I don't like saying it but . Please help !
We use ASP.NET Session but still having problem with resources 
The images and charts not seen on reports.

Client
I
I
I
LoadBalancer (https)
---------------------App1 (State Server) -http 
---------------------App2-http


I've tried your file provider and shared App1's cache dictionary with App2. Such as \\App1Name\CacheFolder
My application pools use same user impersonation exist. Both App1 and App2 can write image files to CacheFolder but on the client side nothing seen.(white screen instead of charts)

Then I coded a CustomProvider  seen below, it works on my development environment, also works on our company server(no load balance just https [transport set]) . 

But it does not work on 
Production.

Tell me what is wrong ?

Setting
 <section
             name="Telerik.Reporting"
             type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting, Version=7.0.13.220, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
             allowLocation="true"
             allowDefinition="Everywhere"/>
  </configSections>
  <Telerik.Reporting>
    <Cache provider="DReportingResourceProvider">
      <Providers>
        <Provider name="DReportingResourceProvider" type="AHBSBus.DReportingResourceProvider, AHBSBus.Web,Version=1.3.8.0, Culture=neutral, PublicKeyToken=null">
          <Parameters>
            <Parameter name="cachingdirectory" value="D:\Apps\Cache" />
          </Parameters>
        </Provider>
      </Providers>
    </Cache>
  </Telerik.Reporting>

Code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Telerik.Reporting.Cache.Interfaces;
using System.IO;
 
namespace AHBSBus
{
    public class DReportingResourceProvider : ICacheProvider
    {
 
        public ICache CreateCache(System.Collections.IDictionary parameters)
        {
            return new FileCacher(parameters);
        }
    }
 
    public class FileCacher : Telerik.Reporting.Cache.Interfaces.ICache
    {
        private string cachingdirectory = null;
        //readonly System.Collections.Generic.IDictionary<string, byte[]> cache;
 
        public FileCacher(System.Collections.IDictionary parameters)
        {            
            cachingdirectory = parameters["cachingdirectory"].ToString();            
        }
 
        public bool HasValue(string key)
        {
            string fullPath=Path.Combine(cachingdirectory,key);
            return File.Exists(fullPath);
        }
 
        public byte[] GetValue(string key)
        {
            string fullPath=Path.Combine(cachingdirectory,key);
            return File.ReadAllBytes(fullPath);
        }
 
        public void SetValue(string key, byte[] value)
        {
            string fullPath=Path.Combine(cachingdirectory,key);
            File.WriteAllBytes(fullPath, value);
        }
 
        public void Clear()
        {
            System.IO.DirectoryInfo directoryInfo = new DirectoryInfo(cachingdirectory);
 
            foreach (FileInfo file in directoryInfo.GetFiles())
            {
                file.Delete();
            }
            foreach (DirectoryInfo dir in directoryInfo.GetDirectories())
            {
                dir.Delete(true);
            }
        }
 
        public void Dispose()
        {
            this.Clear();
        }
    }
}

0
Warren
Top achievements
Rank 2
answered on 05 Jun 2013, 07:27 PM
We never tried Server State sessions.  We went with SqlServer session state which was fairly easy to setup.  We've been running like this for the past 4 years without any issues.  I suggest going that route if you can.
0
Nurali
Top achievements
Rank 1
answered on 12 Jun 2013, 04:05 PM
Hi,
I just see an empty screen.

BUT
If I save report as pdf,tiff etc. I can see charts.
But I could not print as XPS. This gives us a clue about source of problem?

Soap actions seen,

SOAPAction: "Telerik.ReportService/IReportService/RenderAndCache"
SOAPAction: "Telerik.ReportService/IReportService/GetPage"

//Is this mean no error ? I got it for GetPage action
<a:Error i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:a="http://schemas.datacontract.org/2004/07/Telerik.Reporting.Service" />

no more Soap action traced for downloading images

Thanks in advance
0
أشرف
Top achievements
Rank 1
answered on 18 Aug 2014, 10:08 AM
[quote]Currently Telerik Reporting uses the ASP.NET Session in order to store resources such as the html pages and images of the report. In case you are using a web farm it is necessary that the session of the web applications is configured as SQLServer or StateServer so that it can be common for all applications. Most probably this should solve the experienced problems.[/quote]

Does this mean that the data that Telerik Reporting writes to the session are serializable and won't cause problems if I use the state service or SQL Server session state provider?
0
أشرف
Top achievements
Rank 1
answered on 18 Aug 2014, 10:55 AM
The documentation article here
http://www.telerik.com/help/reporting/asp-net-report-viewer-outproc.html
answered my questions
Asked by
Warren
Top achievements
Rank 2
Answers by
Chavdar
Telerik team
Nurali
Top achievements
Rank 1
Warren
Top achievements
Rank 2
أشرف
Top achievements
Rank 1
Share this question
or