You get this error when running your application.
Security accessibility of the overriding method must match the security accessibility of the method being overriden
Add the following code to all AssemblyInfo.cs (.vb) files in your application.
Visual Basic .NET:
Imports System.Security
<Assembly: SecurityRules(SecurityRuleSet.Level1)>
C#:
using System.Security;
[assembly: SecurityRules(SecurityRuleSet.Level1)]
Part VII: Troubleshooting Applications
Application Runs But No Data is Displayed