Hello,

I have a class that implements the interface IMessageFilter. When I run
FxCop on this class the following error appears:
The virtual method IMessageFilter.PreFilterMessage(Message&):Boolean
defined by type 'System.Windows.Forms. IMessageFilter' and its override
MessageFilter.PreFilterMessage(Message&):Boolean do not have the same
LinkDemand status. Add a LinkDemand where required.

I have placed the folloing code:
[CustomPermissionAttribute(SecurityAction.LinkDemand)] but still have
the same error. I tried with the
[CustomPermissionAttribute(SecurityAction.LinkDemand),
Unrestricted=true] and also with Unrestricted=false but nothing, same
error.

Can someone tell me what I do wrong.

Thank you.

Re: LinkDemand Error by Nicole

Nicole
Fri Jan 07 10:26:08 CST 2005

Answered in microsoft.public.dotnet.security.


"Cristian Anca" <cristi.anca@go.ro> wrote in message
news:eNXef8M9EHA.2540@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> I have a class that implements the interface IMessageFilter. When I run
> FxCop on this class the following error appears:
> The virtual method IMessageFilter.PreFilterMessage(Message&):Boolean
> defined by type 'System.Windows.Forms. IMessageFilter' and its override
> MessageFilter.PreFilterMessage(Message&):Boolean do not have the same
> LinkDemand status. Add a LinkDemand where required.
>
> I have placed the folloing code:
> [CustomPermissionAttribute(SecurityAction.LinkDemand)] but still have
> the same error. I tried with the
> [CustomPermissionAttribute(SecurityAction.LinkDemand),
> Unrestricted=true] and also with Unrestricted=false but nothing, same
> error.
>
> Can someone tell me what I do wrong.
>
> Thank you.



RE: LinkDemand Error by Juliette

Juliette
Tue May 08 16:59:45 CDT 2007

tes

Posted via DevelopmentNow.com Group
http://www.developmentnow.com