none
Error using MS ReportViewer with ClickOnce deployment. RRS feed

  • Question

  • Hi!

    I make an application with many dlls merged into it, after that application deploy with ClickOnce. Before deployment application is obfuscated and after installation run without any error. One of libraries contain ReportViewer control and used to show reports. But if application is installed via ClickOnce it generate exception that application is need SecurityPerimitions.

    Try to use 

    [assembly: SecurityPermissionAttribute(SecurityAction.RequestMinimum, Execution = true, Unrestricted = true, Flags = SecurityPermissionFlag.AllFlags)]

    but then application hangs without any error.

    Could anyone help me?

    Error message:

    An error occurred during local report processing. Failed to load expression host assembly. Details: Request for the permission of type 'System.Security.Permissions.SecurityPermission', mscorlib, Version=4.0.0.0, Culture=neutral..... ' failed.

    • Edited by Layko Andrey Tuesday, October 11, 2011 10:26 AM
    • Moved by Paul Zhou Friday, October 14, 2011 7:02 AM move for better support (From:Common Language Runtime)
    Tuesday, October 11, 2011 10:15 AM

All replies

  • Move to Visual Studio Report Controls forum to get better support.
    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, October 14, 2011 7:03 AM
  • The problem was resolved by excluding from report file (.rdlc) any parameters and expressions such as any string operations (such as .Value + " / " + ...Value) and formatting.

    But also was problem with protected exe, but it was also solved.

    Monday, October 17, 2011 10:31 AM
  • I've seen this problem when running an Asp.Net site hosted in medium trust. I get the same error you mentioned: An error occurred during local report processing. Failed to load expression host assembly. Details: Request for the permission of type 'System.Security.Permissions.SecurityPermission', mscorlib, Version=4.0.0.0, Culture=neutral..... ' failed.

    Could you answer a couple of questions?

    1. Are you saying the only solution you found was to deploy local reports without any parameters and without any expressions in the report content? I gave up on local reports and used remote report processing from a Report Server, which is now working, but would have preferred keeping the local reports.
    2. What was the problem with the protected exe and how was it solved?
    Tuesday, October 18, 2011 6:51 PM