System.Security.Policy.PolicyException: Required permissions cannot be acquired.
-
Thursday, February 11, 2010 10:35 AMhello,
when i used report viewer following dll is missing then i put in the bin folder
Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.WebForms.dll.
it show another error is System.Security.Policy.PolicyException: Required permissions cannot be acquired.
FileLoadException: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Failed to grant minimum permission requests
System.Security.Policy.PolicyException: Required permissions cannot be acquired.- Changed Type Merlin Abu Thursday, February 11, 2010 11:05 AM
- Changed Type Merlin Abu Friday, February 12, 2010 4:55 AM
- Changed Type Merlin Abu Friday, February 12, 2010 4:56 AM
- Changed Type Merlin Abu Friday, February 12, 2010 1:31 PM Visual Studio Report Controls
All Replies
-
Monday, February 22, 2010 9:30 AMModeratorHi, Merlin:
The exception indicates that the permission required by the assembly for its minimum grant set is not granted by the CLR security policy. So the assembly couldn't be loaded and the exception is thrown. You could check its minimum request set by looking for .permissionset reqmin in ILDasmto see why your policy didn't grant the assembly those permissions.
Here are some refs you may need:
1. Understanding Security Policies
http://msdn.microsoft.com/en-us/library/ms154466.aspx
2. The Security Infrastructure of the CLR Provides Evidence, Policy, Permissions, and Enforcement Services
http://msdn.microsoft.com/en-us/magazine/cc188939.aspx
Please mark the right answer at right time.
Thanks,
Sam

