Built-in fields error when web.config <roleManager enabled=true> RRS feed

  • Question

  • I am using VS 2010 with rldc reports on Windows 7 x64. I found out that when you create a web site with .NET 4.0 target framework, if you have set <roleManager enabled=true> in web.config, the built-in fields (Globals!PageNuber, etc.) are giving #Error. Even the simplest test such as web site with report on one page is generating this problem.

    If the target framework is .NET 3.5 the error does not occur.

    Any suggestion how to resolve the issue? 

    Friday, August 6, 2010 6:58 AM


  • Hi there. Looks like there's a bug filed for this behavior already. In the mean time, you can use the following workaround in your code in .NET 4.0. You can also try to use the legacy CAS policy flag in your Web.config to get the .NET 3.5 behavior. Note that the ReportViewer when targeting 4.0 uses the sandboxed app domain by default, instead of the current app domain it uses when targeting 3.5. The code below gives the sandboxed app domain full trust.


    Cephas Lin This posting is provided "AS IS" with no warranties.
    • Marked as answer by BaneO Thursday, August 19, 2010 6:19 PM
    Monday, August 9, 2010 2:54 PM