I just enabled the Windows Token Role Manager on an internal ASP Forms web application, and it's working fine, except it seems to have broken a ReportViewer control. The only authorization I have in place is to deny anonymous users. The Local Report sets a parameter to the value of Globals!ExecutionTime at run, then I grab that parameter in code behind and calculate a refresh time from it. While the Windows Role Manager is disabled this works fine, but when I enable it in Web.Config the ReportViewer shows the following error:
"An error occured during local report processing. The Default Value expression for the report parameter 'ExecTimeParam' contains an error: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed."
And Code behind breaks with a Null exception when setting the vb variable to the RV Parameter.
<!--Web.Config Code--><system.web><roleManager defaultProvider="AspNetWindowsTokenRoleProvider" /><roleManager enabled="true" defaultProvider="WindowsProvider"><providers><clear/><add name="WindowsProvider" type="System.Web.Security.WindowsTokenRoleProvider" /></providers></roleManager> ...<authorization><deny users="?" /></authorization> ...<!--Code Behind that Breaks--> Dim ReportViewerVar As ReportViewer = MainContent.FindControl("ProductionReportViewer") If ReportViewerVar IsNot Nothing Then Dim ReportVar As LocalReport = ReportViewerVar.LocalReport Dim ParamValuesVar As String = ReportVar.GetParameters("ExecTimeParam").Values(0) 'This line that breaks ...
Any suggestions are greatly appreciated, Thanks in advance!