Feb 21, 2012 11:21 PM|iniki|LINK
Can anyone please guide me the usage of AspNetHostingPermission attribute for a Server/User Control?
I am creating a server control and the online example that I found is something like -
[AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class MyWebControl : WebControl
What I have understood after reading about this is somewhat related to safe coding practice and is useful for sites with High trust level.
Can anyone please guide me
- the purpose of 'AspNetHostingPermission' - in what scenarios it is useful?
- Is it different/related to trust level set in application configuration?