Reading the web.config file in SQL Reporting Services

The .NET Framework v2.0 gives us the ability to (easily) read the web.config file of our applications for information like <appSettings> using the System.Configuration and System.Web.Configuration namespaces: This probably isn't news to most of you.

Will this work with Reporting Services? Yes, with a caveat around security. Remember that you'll be writing custom code to do this work...and custom code (whether embedded code behind your report or in an custom assembly) won't have the necessary permissions to run under SSRS unless you first grant them in rssvrpolicy.config.

 How do you do this, you ask? See this article:

 https://support.microsoft.com/kb/842419