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

Load Balancing Reporting WCF Service

4 Answers 121 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
William Lim
Top achievements
Rank 1
William Lim asked on 29 Nov 2011, 09:51 AM
We are planning to use load balancer to improve our web service application performance. Since we are going to use this load balancer, we prefer not to use any session state in our application which means the session state will be completely disabled by default. The problem is now our web service application also hosts the Telerik Reporting WCF service. We just found out that this reporting service requires the session state to be enabled. Is there anyway for us to avoid this session state?

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 30 Nov 2011, 01:30 PM
Hello Chris Skeen,

Currently the Telerik Reporting WCF service requires ASP.NET Session State and their is no way to avoid this requirement. However we will have in mind your requirement for future report service improvements

Best wishes,
Peter
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

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
Unknown
Top achievements
Rank 1
answered on 10 Jun 2013, 02:23 PM
You can check if you have set correctly the read permissions as well. Other than that you will have to compare the servers in order to find the differencies and see what is causing the trouble.

Also you might have problems with the handler, which is used for the images - check if you have correctly added it.
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
Tags
General Discussions
Asked by
William Lim
Top achievements
Rank 1
Answers by
Peter
Telerik team
Nurali
Top achievements
Rank 1
Unknown
Top achievements
Rank 1
Share this question
or