Hallo Liste
Ich habe ein Control geschrieben:
namespace test
{
public class Toolbar : Control
{
protected override void Render(HtmlTextWriter output)
{
//...
}
}
}
Und das mal vom FxCop checken lassen.
Bekommen da nur der "Critical Error":
>Virtual methods and their overrides require the same LinkDemand status<
The virtual method 'Render' in type 'Control' and its override 'Render'
do not have the same LinkDemand status. Add a LinkDemand where it is
missing or review.
As it is possible to call any of the overrides of a virtual method
explicitly, they should all have the same LinkDemand status or, if not,
should be reviewed. This also applies to LinkDemand security checks for
methods that are part of an interface implementation, because the caller
might use an interface-typed reference to access the method. Use the
PermView.exe tool to view the security permissions in the assembly.
------------------------------------------------------------------------
-------------
PermView.exe auf System.Web.dll liefert mir folgendes:
Class System.Web.UI.Control LinktimeDemand permission set:
<PermissionSet class="System.Security.PermissionSet"
version="1">
<IPermission class="System.Web.AspNetHostingPermission, System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Level="Minimal"/>
</PermissionSet>
Class System.Web.UI.Control InheritanceDemand permission set:
<PermissionSet class="System.Security.PermissionSet"
version="1">
<IPermission class="System.Web.AspNetHostingPermission, System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Level="Minimal"/>
</PermissionSet>
------------------------------------------------------------------------
-------------
Hab schon folgendes probiert (ohne erfolg...)
[System.Security.Permissions.StrongNameIdentityPermission(
System.Security.Permissions.SecurityAction.LinkDemand)]
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags=System.Security.Permissions.SecurityPermissionFlag.ControlPrincipa
l)]
[System.Web.AspNetHostingPermissio(
System.Security.Permissions.SecurityAction.LinkDemand)]
protected override void Render(HtmlTextWriter output)
...
Kann irgendjemand mir sagen wie ich den Fehler wegkriege?
Daniel
_______________________________________________
Csharp.net mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/csharp.net