<?xml version="1.0" encoding="utf-8"?> <Type Name="WebPermissionAttribute" FullName="System.Net.WebPermissionAttribute" FullNameSP="System_Net_WebPermissionAttribute" Maintainer="ecma"> <TypeSignature Language="ILASM" Value=".class public sealed serializable WebPermissionAttribute extends System.Security.Permissions.CodeAccessSecurityAttribute" /> <TypeSignature Language="C#" Value="public sealed class WebPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute" /> <TypeSignature Language="ILAsm" Value=".class public auto ansi serializable sealed beforefieldinit WebPermissionAttribute extends System.Security.Permissions.CodeAccessSecurityAttribute" /> <MemberOfLibrary>Networking</MemberOfLibrary> <AssemblyInfo> <AssemblyName>System</AssemblyName> <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey> <AssemblyVersion>1.0.x.x</AssemblyVersion> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement> <Base> <BaseTypeName>System.Security.Permissions.CodeAccessSecurityAttribute</BaseTypeName> </Base> <Interfaces /> <Attributes> <Attribute> <AttributeName>System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.All, AllowMultiple=true, Inherited=false)</AttributeName> </Attribute> </Attributes> <Docs> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para> <see cref="T:System.Net.WebPermissionAttribute" /> allows you to declaratively specify which URI strings and regular expression strings your class can use.</para> <para>The security information specified in the <see cref="T:System.Net.WebPermissionAttribute" /> is stored in the metadata of the attribute target, which is the class to which <see cref="T:System.Net.WebPermissionAttribute" /> is applied. The system accesses this information at run time. The <see cref="T:System.Security.Permissions.SecurityAction" /> passed to the constructor determines the allowable <see cref="T:System.Net.WebPermissionAttribute" /> targets. The system uses the <see cref="T:System.Net.WebPermission" /> returned by the <see cref="M:System.Net.WebPermissionAttribute.CreatePermission" /> method to convert the security information of the attribute target to a serializable form stored in metadata.</para> <block subset="none" type="note"> <para> <see cref="T:System.Net.WebPermissionAttribute" /> is used only for <format type="text/html"><a href="97E21EFD-6E89-4115-90D5-AD239513DAD8">[<topic://cpcondeclarativesecurity>]</a></format>. For <format type="text/html"><a href="15AAB1E1-6B7D-41AD-B102-C1ED7BEDEA27">[<topic://cpconimperativesecurity>]</a></format>, use the corresponding <see cref="T:System.Net.WebPermission" />.</para> </block> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Specifies permission to access Internet resources. This class cannot be inherited.</para> </summary> </Docs> <Members> <Member MemberName=".ctor"> <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(valuetype System.Security.Permissions.SecurityAction action)" /> <MemberSignature Language="C#" Value="public WebPermissionAttribute (System.Security.Permissions.SecurityAction action);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Security.Permissions.SecurityAction action) cil managed" /> <MemberType>Constructor</MemberType> <AssemblyInfo> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue /> <Parameters> <Parameter Name="action" Type="System.Security.Permissions.SecurityAction" /> </Parameters> <Docs> <exception cref="T:System.ArgumentException"> <paramref name="action" /> is not a valid <see cref="T:System.Security.Permissions.SecurityAction" /> value. </exception> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>The <see cref="T:System.Security.Permissions.SecurityAction" /> value passed to this constructor specifies the allowable security actions that can be performed on this class.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Initializes a new instance of the <see cref="T:System.Net.WebPermissionAttribute" /> class with a value that specifies the security actions that can be performed on this class.</para> </summary> <param name="action"> <attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Security.Permissions.SecurityAction" /> values. </param> </Docs> <Excluded>0</Excluded> </Member> <Member MemberName="Accept"> <MemberSignature Language="ILASM" Value=".property string Accept { public hidebysig specialname instance string get_Accept() public hidebysig specialname instance void set_Accept(string value) }" /> <MemberSignature Language="C#" Value="public string Accept { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance string Accept" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.String</ReturnType> </ReturnValue> <Parameters /> <Docs> <value> <para>A <see cref="T:System.String" /> that represents the URI accepted by the current instance.</para> </value> <exception cref="T:System.ArgumentException"> <see cref="P:System.Net.WebPermissionAttribute.Accept" />is being set and is not <see langword="null" />.</exception> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>When applying <see cref="T:System.Net.WebPermissionAttribute" /> to your class, this property specifies what URI string will be accepted for use within your class. This permission is applied when the security system calls <see cref="M:System.Net.WebPermissionAttribute.CreatePermission" />. This property is write-once.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Gets or sets the URI string accepted by the current <see cref="T:System.Net.WebPermissionAttribute" />.</para> </summary> </Docs> <Excluded>0</Excluded> </Member> <Member MemberName="AcceptPattern"> <MemberSignature Language="C#" Value="public string AcceptPattern { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance string AcceptPattern" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.String</ReturnType> </ReturnValue> <Docs> <value>To be added.</value> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>When applying <see cref="T:System.Net.WebPermissionAttribute" /> to your class, this property specifies what regular expression string will be accepted for use within your class. This property is write-once.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Gets or sets a regular expression pattern that describes the URI accepted by the current <see cref="T:System.Net.WebPermissionAttribute" />.</para> </summary> </Docs> </Member> <Member MemberName="Connect"> <MemberSignature Language="ILASM" Value=".property string Connect { public hidebysig specialname instance string get_Connect() public hidebysig specialname instance void set_Connect(string value) }" /> <MemberSignature Language="C#" Value="public string Connect { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance string Connect" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.String</ReturnType> </ReturnValue> <Parameters /> <Docs> <value> <para>A <see cref="T:System.String" /> that represents the connection controlled by the current instance.</para> </value> <exception cref="T:System.ArgumentException"> <see cref="P:System.Net.WebPermissionAttribute.Connect" /> is being set and is not <see langword="null" />.</exception> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>When applying <see cref="T:System.Net.WebPermissionAttribute" /> to your class, this property specifies what URI connection is accepted for use within your class. This property is write-once.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Gets or sets the URI connection string controlled by the current <see cref="T:System.Net.WebPermissionAttribute" />.</para> </summary> </Docs> <Excluded>0</Excluded> </Member> <Member MemberName="ConnectPattern"> <MemberSignature Language="C#" Value="public string ConnectPattern { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance string ConnectPattern" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.String</ReturnType> </ReturnValue> <Docs> <value>To be added.</value> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>When applying <see cref="T:System.Net.WebPermissionAttribute" /> to your class, this property specifies what regular expression connect string is accepted for use within your class. This property is write-once.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Gets or sets a regular expression pattern that describes the URI connection controlled by the current <see cref="T:System.Net.WebPermissionAttribute" />.</para> </summary> </Docs> </Member> <Member MemberName="CreatePermission"> <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission CreatePermission()" /> <MemberSignature Language="C#" Value="public override System.Security.IPermission CreatePermission ();" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Security.IPermission CreatePermission() cil managed" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyVersion>1.0.5000.0</AssemblyVersion> <AssemblyVersion>2.0.0.0</AssemblyVersion> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Security.IPermission</ReturnType> </ReturnValue> <Parameters /> <Docs> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>The <see cref="M:System.Net.SocketPermissionAttribute.CreatePermission" /> method is called by the security system, not by application code.</para> <para>The security information described by <see cref="T:System.Net.WebPermissionAttribute" /> is stored in the metadata of the attribute target, which is the class to which <see cref="T:System.Net.WebPermissionAttribute" /> is applied. The system accesses the information at run time. The system uses the <see cref="T:System.Net.WebPermission" /> returned by <see cref="M:System.Net.SocketPermissionAttribute.CreatePermission" /> to convert the security information of the attribute target to a serializable form stored in metadata.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Creates and returns a new instance of the <see cref="T:System.Net.WebPermission" /> class.</para> </summary> <returns> <attribution license="cc4" from="Microsoft" modified="false" /> <para>A <see cref="T:System.Net.WebPermission" /> corresponding to the security declaration.</para> </returns> </Docs> <Excluded>0</Excluded> </Member> </Members> <TypeExcluded>0</TypeExcluded> </Type>