Wednesday, February 20, 2013 5:39 AM
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-22.214.171.124, 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?
Thank you in advance.
Sunday, February 24, 2013 12:40 PM
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.
- Marked As Answer by TS Lim Sunday, February 24, 2013 12:41 PM