Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Reporting > Telerik Reporting > Changing SessionState ConnectionString programmatically

Not answered Changing SessionState ConnectionString programmatically

Feed from this thread
  • Fred avatar

    Posted on Jan 30, 2012 (permalink)

    Hi there,

    We're using the SQL Server provider to store Telerik Reports session state in a database.  We have this Section set in the Web.Config file for our C#/ASP.Net web project:

      <Telerik.Reporting>
        <SessionState provider="Database">
          <Providers>
            <Provider name="Database" type="Telerik.Reporting.DatabaseSession.DatabaseSessionProvider, Telerik.Reporting.DatabaseSession, Version=5.3.12.119, Culture=neutral, PublicKeyToken=a9d7983dfcc261be">
              <Parameters>
                <Parameter name="BackendName" value="mssql" />
                  <Parameter name="ConnectionString" value="MyConnectionString" />
              </Parameters>
            </Provider>
          </Providers>
        </SessionState>
      </Telerik.Reporting> 


    Everything is working fine, except we want to take the " <Parameter name="ConnectionString" value="MyConnectionString" />" out of the Web.Config file and add it, or at least update it, programmatically, in Global.asax, getting the ConnectionString from the AppSettings which is stored in a separate envsettings.config file.  I've found code online showing how to update programmatically the AppSettings section of the web.config file, but not a custom section like "Telerik.Reporting".  Does anyone have anyone sample code that would demonstrate how to do this?

    Many thanks,


    Reply

  • Steve Steve admin's avatar

    Posted on Feb 3, 2012 (permalink)

    Hi Fred,

    The database session provider is used in the processing stage and even if there was an out of the box way to access the Telerik.Reporting section, there is no right place in the life cycle where you could plug-in to do so.

    All the best,
    Steve
    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!

    Reply

  • Fred avatar

    Posted on Feb 8, 2012 (permalink)

    I don't understand your comment about there being no right place in the life-cycle. Surely when application initialization occurs the connection string for the provider could be set to a new value if it were actually exposed.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Reporting > Telerik Reporting > Changing SessionState ConnectionString programmatically
Related resources for "Changing SessionState ConnectionString programmatically"

Features  |  Documentation  |  Demos  |  Telerik TV  |  Knowledge Base  |  Code Library  |  Step-by-step Tutorial  |  Blogs  |  Whitepaper  ]