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

Telerik Reporting with Azure

1 Answer 181 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gerald Toh
Top achievements
Rank 1
Gerald Toh asked on 23 May 2012, 03:41 PM
Dear All,

Telerik Report Version: 6.0.12.215
Visual Studio 2010
Azure SDK Version: 1.6

We are developing on Microsoft Azure Web Application using Telerik Reporting. We are using AppFabric Cache Session Provider to handle session. We are passing parameter to report using session. But when we are using AppFabric Cache instead of default Session Provider. The telerik report have some weird behaviour, which every time we open the report using report viewer. The server side code will run 3 times instead of 1. When try to navigate away from page report viewer webpage, the report will refire into initialize component, after that we found that the value of the session lost and the whole website hang over there until force close the webpage and re open again.


Reference:
Report Code:
public Invoice_Main()
{
InitializeComponent();
string ID = System.Web.HttpContext.Current.Session["ID"].ToString();
}

AppFabric 
Cache Session Provider 
<sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider">
      <providers>
        <add name="AppFabricCacheSessionStoreProvider"
             type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache"
             cacheName="default"
             applicationName="COREMatter.Web"
             dataCacheClientName="default" />
      </providers>
    </sessionState>

Default Session Provider
  <sessionState mode="InProc" customProvider="DefaultSessionProvider">
      <providers>
        <add name="DefaultSessionProvider"
          type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
          connectionStringName="DefaultConnection" 
          applicationName="/"/>
      </providers>
    </sessionState>

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 28 May 2012, 01:59 PM
Hi Susan,

Telerik Reporting is an embedded engine and Telerik Reports are standard .NET classes, so accessing session in its constructor is the same as accessing session in a normal class. We recommend reviewing the following KB article that elaborates on handling out-proc session: Design Considerations for Out-Proc Session State.

Kind regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Gerald Toh
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or