none
FullTrust Issue with Local Reports RRS feed

  • Question

  • I have a few users that are getting the following exception when trying to run local reports, in RDLC 2008 format, with the ReportViewer 2010.

    Stack Trace:
       at Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession()
       at Microsoft.Reporting.WinForms.LocalReport.InternalRender(format As String, allowInternalRenderers As Boolean, deviceInfo As String, pageCountMode As PageCountMode, createStreamCallback As CreateAndRegisterStream, warnings As Warning[]&)
       at Microsoft.Reporting.WinForms.AsyncAllStreamsRenderingOperation.RenderLocalReport(report As LocalReport)
       at Microsoft.Reporting.WinForms.AsyncRenderingOperation.PerformOperation()
       at Microsoft.Reporting.WinForms.AsyncReportOperationWrapper.PerformOperation()
       at Microsoft.Reporting.WinForms.ProcessingThread.ProcessThreadMain(arg As Object)

    Exception Hierarchy:
    Top Level    Microsoft.Reporting.WinForms.LocalProcessingException    Void EnsureExecutionSession()
        Local report processing requires FullTrust Code Access Security permissions, which is unavailable to the calling code.  Grant the application FullTrust permissions or use ServerReport to execute the report remotely.
    Inner Exception 1    System.Security.SecurityException    Microsoft.ReportingServices.Library.ControlSnapshot get_CompiledReport()
        Request failed.

     

    This has happened on Windows XP SP3 and 7 so far.  The app targets the .NET Framework 3.5.

    I currently have Viewer.LocalReport.ExecuteReportInSandboxAppDomain() set in the app and that is working for the majority of users.  I tried playing around with AddFullTrustModuleInSandboxAppDomain and SetBasePermissionsForSandboxAppDomain since ExecuteReportInSandboxAppDomain is deprecated.  However, that actually causes that exact same exception on one of our non-development machines, whereas ExecuteReportInSandboxAppDomain works just fine.  What is curious, is that the first report generates just fine, but none after that. So, I am at a loss.

    Thursday, January 27, 2011 1:30 AM

All replies

  • It'd be good to see your actual code.Not sure what "first report generates just fine, but none after that" means.
    Cephas Lin This posting is provided "AS IS" with no warranties.
    Saturday, January 29, 2011 12:03 AM
    Moderator