none
'System.Permissions.SecurityPermission, mscorlib... failed

    Question

  • My VB.net 2010 project is running under .net framework 2.0. It has reportviewer control displaying rdlc report (local report).

    The references of the reports included in the project are Microsoft.ReportViewer.Common.dll and Microsoft.ReportViewer.WinForms.dll. There is no proplem running the program in my computer.

    When the excutable file of the project plus the  the references were save on another machine, the program runs ok except when displaying the report with the reportviewer. The exception indicates the Microsoft.ReportViewer.ProcessingObjectModel.dll is missing.

    I then copy the  file  Microsoft.ReportViewer.ProcessingObjectModel.dll to the same directory of the excutable file. When displaying the report, is still give exception. This time the exeption is differnet.
    The excepiton is not shown in the excepiton window but at the reportviewer control.

    The exception reads like this:

    An error occured during local report processing.
    Failed to load expression host assembly.
    Details: Request for the permission of type 'System.Permissions.SecurityPermission, mscorlib,
    Version-2.0.0.0, Culture=neutral,PublicKey Token=b77a5c561934e089' failed.

    What can go wrong here? I copied the Microsoft.ReportViewer.ProcessingObjectModel.dll to the program directory. Is it the right  way to sovle the missing dll file problem?

    Kindly advise.

    Thank you in advance.


    TS Lim

    Wednesday, February 20, 2013 5:39 AM

Answers

  • I found the reason for the problem. The exception occurs when the  excutable file (the program exe file) is obfuscated.

    I send my obfuscated file to run in another machine but the non-obfucated file in my computer, this cause the confusion.

    Thank you anyway for  those who spend time to read my problem.


    TS Lim

    • Marked as answer by TS Lim Sunday, February 24, 2013 12:41 PM
    Sunday, February 24, 2013 12:40 PM

All replies

  • I found the reason for the problem. The exception occurs when the  excutable file (the program exe file) is obfuscated.

    I send my obfuscated file to run in another machine but the non-obfucated file in my computer, this cause the confusion.

    Thank you anyway for  those who spend time to read my problem.


    TS Lim

    • Marked as answer by TS Lim Sunday, February 24, 2013 12:41 PM
    Sunday, February 24, 2013 12:40 PM
  • Hi Lim,

    Have you find any solution to work rdlc with obfuscated exe?  If so can you please share?

    Thanking you,

    Madhu.T.

    Saturday, August 31, 2013 4:49 AM