SQL Server Reporting Services Subscriptions with custom security

Posted by: Clarity Blogs: ASP.NET, on 28 May 2008 | View original | Bookmarked: 0 time(s)

I ran into an interesting 'gotcha' when working with an SSRS site that has a custom security extension implemented (instead of using the built in Windows authentication model, see the MSDN security extension example).  The problem was that when users had set up a subscription through the SSRS web site that requested a copy of the report (such as in pdf or excel format), the subscription would fail to run.  Looking in the SSRS I'd see error entries similar to the following:

ReportingServicesService!library!13!05/27/2008-14:00:16:: i INFO: Call to RenderFirst( '/Financial Reports/Virtual Bookstore Sales By Term' )

ReportingServicesService!library!13!05/27/2008-14:00:16:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;

 Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.TypeInitializationException: The type initializer for 'Framework.SystemConfiguration' threw an exception. ---> System.ApplicationException: Can not find applicationConfigurationManagement section in app.config.

   at Framework.ConfigurationManagement.ConfigurationManager.Read(String sectionName, String qualifierName)
   at Framework.SystemConfiguration.LoadConnectionStrings()
   at Framework.SystemConfiguration.Initialize()
   at Framework.SystemConfiguration..cctor()
   --- End of inner exception stack trace ---
   at customReporting.Authorization.CheckAccess(String userName, IntPtr userToken, Byte[] secDesc, ReportOperation requiredOperation)

   at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType catItemType, Byte[] secDesc, ReportOperation rptOper, String reportPath)

   at Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromCatalog(CatalogItemContext reportContext, String historyID, Boolean forRendering, Guid& reportID, Int32& executionOption, String& savedParametersXml, ReportSnapshot& compiledDefinition, ReportSnapshot& snapshotData, Guid& linkID, DateTime& historyOrSnapshotDate, Byte[]& secDesc)

   at Microsoft.ReportingServices.Library.RSService._GetReportParameters(ClientRequest session, String report, String historyID, Boolean forRendering, NameValueCollection values, DatasourceCredentialsCollection credentials)

   at Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters)

   at Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)

   --- End of inner exception stack trace --

 The error indicated that my custom security dll (customReporting) which utilizes a common library component for our data access and such (framework.dll) was not able to find a setting section in the app.config file.  At first I thought it was something related to the web site configuration for custom security since that is where you have to set everything up to get your custom security extension to work.  But, everything looked good there.  Looking further I found that it is running the subscription process under the SQL Reporting Services windows service instance so it is actually not using the web configurations when executing the custom extension dll but it runs in the context of the service.  So to fix this problem you need to add any configuration settings into the ReportServer\bin\ReportingServicesService.exe.config file.  This is the configuration file that the SQL Reporting Services windows service is utilizing.  Once I added my config information to that file subscriptions worked like a charm!

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Security | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2243 | Hits: 11

Similar Posts

  • Migrated from Community Server to DasBlog more
  • Exporting SWF & FLV format reports in SSRS 2005 and 2008 more
  • Free software for you! WebsiteSpark let the mountain go to Microsoft instead. more
  • An alternative to Crystal more
  • Ruminations on Multi-Tenant Data Architectures more
  • How to completely process and filter all bounced e-mail messages and get a notification via email when it's completed! more
  • ScottGu Mix Keynote coding demo posted more
  • How to get VSTS, VS and Expression at a discount (Canada) more
  • Updated Slides and Samples from My DevConnections Spring 2009 Orlando Talks more
  • Aspose.Slides for Reporting Services supports SQL Server 2008 more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD