Ask a Question related to ASP.NET Security, Design and Development.
-
Chris Mohan #1
FxCop: a LinkDemand Error, I fixed it but Don't understand the sol
HI,
I recently scanned an assembly with FXCOP and got this error in the report:
"Virtual methods and their overrides require the same LinkDemand status." I
fixed it.. but would like to know what others think of myt solution. re:the
class in the assembly inherits from the textbox control in
system.web.ui.webcontrols. My code overRides the base classes
addAttributesToRender method.
So, i fixed it by firing up Reflector and copying the linkdemand used within
the framework's webcontrol class's addAttriburtesToRender method. That
worked...on the next scan FX cop was happy. So, the link demand is unusual
looking to me .. it looks like it dynamically catches the caller's security
policy at run time.
Can anyone think of a reason why I shouldn't use the following declarative
security? What does it do? (I've used CAS before but the snippet below is
pretty complex looking.) All i know is that FXCOP stopped reporting the
error. Thanks!
<PermissionSet(SecurityAction.LinkDemand, Xml:=" _
<PermissionSet class=""System.Security.PermissionSet""" & ChrW(13) & _
ChrW(10) & " version=""1"">" & ChrW(13) & ChrW(10) & " _
<IPermission class=""System.Web.AspNetHostingPermission, System, _
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089""" & _
ChrW(13) & ChrW(10) & " version=""1""" & ChrW(13) & ChrW(10) _
& " Level=""Minimal""/>" & ChrW(13) & ChrW(10) _
& "</PermissionSet>" & ChrW(13) & ChrW(10)), _
PermissionSet (SecurityAction.InheritanceDemand, _
Xml:="<PermissionSet class=""System.Security.PermissionSet""" & ChrW(13) _
& ChrW(10) & " version=""1"">" & ChrW(13) & ChrW(10) & " _
<IPermission class=""System.Web.AspNetHostingPermission, System, _
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089""" & _
ChrW(13) & ChrW(10) & " version=""1""" & ChrW(13) & _
ChrW(10) & " Level=""Minimal""/>" & ChrW(13) & ChrW(10) _
& "</PermissionSet>" & ChrW(13) & ChrW(10))> _
Chris Mohan Guest
-
error fixed background picture
hi... i have a background picture on my website (CSS fix scrolled) ... now with opening the site in IE i got problems with refresh of the... -
Fixed Error 15000 in Acrobat OCR
I kept getting an "Acrobat could not perform recognition (OCR) because: Unable to process the page because the Paper Capture recognition service... -
got a script error i cant relly understand
ok, i`m doing a flight game in director, got i workin kindda desently, but all of a sudden a script error comes up saying "script error" and then... -
I don't understand this error: File or assembly name l6v3q9ad.dll, or one of its dependencies, was not found.
File or assembly name l6v3q9ad.dll, or one of its dependencies, was not found.I created a WebService project using the template in VS 2003 (.Net... -
dont understand this error
$MainText=" <form action=\"\'.\$_SERVER.\'\" method=\"post\" enctype=\"multipart/form-data\"> <input name=\"user_name\" value=$_POST...



Reply With Quote

