Report is unavailable or session has expired. Load balancing in round robin issue?

7 posts, 1 answers
  1. Warren
    Warren avatar
    24 posts
    Member since:
    May 2008

    Posted 23 Mar 2009 Link to this post

    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
  2. Answer
    Chavdar
    Admin
    Chavdar avatar
    898 posts

    Posted 24 Mar 2009 Link to this post

    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.
  3. DevCraft banner
  4. Nurali
    Nurali avatar
    16 posts
    Member since:
    Oct 2010

    Posted 05 Jun 2013 Link to this post

    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();
            }
        }
    }

  5. Warren
    Warren avatar
    24 posts
    Member since:
    May 2008

    Posted 05 Jun 2013 Link to this post

    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.
  6. Nurali
    Nurali avatar
    16 posts
    Member since:
    Oct 2010

    Posted 12 Jun 2013 Link to this post

    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
  7. Ashraf Sabry
    Ashraf Sabry avatar
    88 posts
    Member since:
    Jan 2011

    Posted 18 Aug 2014 in reply to Chavdar Link to this post

    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.


    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?
  8. Ashraf Sabry
    Ashraf Sabry avatar
    88 posts
    Member since:
    Jan 2011

    Posted 18 Aug 2014 in reply to Ashraf Sabry Link to this post

    The documentation article here
    http://www.telerik.com/help/reporting/asp-net-report-viewer-outproc.html
    answered my questions
Back to Top
DevCraft banner