22 VerifyAspNetHostingPermissionLevel(value,
"Level");
57 throw new ArgumentException(SR.GetString(
"InvalidArgument", state.ToString(),
"state"));
65 VerifyAspNetHostingPermissionLevel(level,
"level");
97 throw new ArgumentException(SR.GetString(
"InvalidArgument", (target ==
null) ?
"null" : target.ToString(),
"target"));
120 throw new ArgumentException(SR.GetString(
"InvalidArgument", (target ==
null) ?
"null" : target.ToString(),
"target"));
144 throw new ArgumentException(SR.GetString(
"InvalidArgument", (target ==
null) ?
"null" : target.ToString(),
"target"));
147 return Level <= aspNetHostingPermission.
Level;
158 if (securityElement ==
null)
162 if (!securityElement.
Tag.Equals(
"IPermission"))
164 throw new ArgumentException(SR.GetString(
"AspNetHostingPermissionBadXml",
"securityElement"));
166 string text = securityElement.Attribute(
"class");
169 throw new ArgumentException(SR.GetString(
"AspNetHostingPermissionBadXml",
"securityElement"));
173 throw new ArgumentException(SR.GetString(
"AspNetHostingPermissionBadXml",
"securityElement"));
175 string strA = securityElement.Attribute(
"version");
178 throw new ArgumentException(SR.GetString(
"AspNetHostingPermissionBadXml",
"version"));
180 string text2 = securityElement.Attribute(
"Level");
196 securityElement.
AddAttribute(
"class", GetType().FullName +
", " + GetType().
Module.Assembly.FullName.Replace(
'"',
'\''));
203 return securityElement;
static string GetName(Type enumType, object value)
Retrieves the name of the constant in the specified enumeration that has the specified value.
Allows a permission to expose an unrestricted state.
AspNetHostingPermissionLevel
Specifies the trust level that is granted to an ASP.NET Web application.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
AspNetHostingPermission(AspNetHostingPermissionLevel level)
Initializes a new instance of the T:System.Web.AspNetHostingPermission class with the specified permi...
override SecurityElement ToXml()
Creates an XML encoding of the permission object and its current state.
StringComparison
Specifies the culture, case, and sort rules to be used by certain overloads of the M:System....
override IPermission Intersect(IPermission target)
When implemented by a derived class, creates and returns a permission that is the intersection of the...
string Tag
Gets or sets the tag name of an XML element.
AspNetHostingPermission(PermissionState state)
Initializes a new instance of the T:System.Web.AspNetHostingPermission class with the specified T:Sys...
bool IsUnrestricted()
Returns a value indicating whether unrestricted access to the resource that is protected by the curre...
static object Parse(Type enumType, string value)
Converts the string representation of the name or numeric value of one or more enumerated constants t...
Provides the base class for enumerations.
Represents the XML object model for encoding security objects. This class cannot be inherited.
Defines the underlying structure of all code access permissions.
Defines methods implemented by permission types.
AspNetHostingPermissionLevel Level
Gets or sets the current hosting permission level for an ASP.NET application.
The exception that is thrown when one of the arguments provided to a method is not valid.
Attribute can be applied to a module.
Controls access permissions in ASP.NET hosted environments. This class cannot be inherited.
PermissionState
Specifies whether a permission should have all or no access to resources at creation.
void AddAttribute(string name, string value)
Adds a name/value attribute to an XML element.
override IPermission Union(IPermission target)
Creates a permission that is the union of the current permission and the specified permission.
override bool IsSubsetOf(IPermission target)
Returns a value indicating whether the current permission is a subset of the specified permission.
override void FromXml(SecurityElement securityElement)
Reconstructs a permission object with a specified state from an XML encoding.
override IPermission Copy()
When implemented by a derived class, creates and returns an identical copy of the current permission ...