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,