1 <Type Name="WebPermission" FullName="System.Net.WebPermission" FullNameSP="System_Net_WebPermission" Maintainer="ecma">
2 <TypeSignature Language="ILASM" Value=".class public serializable WebPermission extends System.Security.CodeAccessPermission" />
3 <TypeSignature Language="C#" Value="public sealed class WebPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission" />
4 <MemberOfLibrary>Networking</MemberOfLibrary>
6 <AssemblyName>System</AssemblyName>
7 <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
8 <AssemblyVersion>1.0.x.x</AssemblyVersion>
9 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
10 <AssemblyVersion>2.0.0.0</AssemblyVersion>
12 <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
14 <BaseTypeName>System.Security.CodeAccessPermission</BaseTypeName>
18 <InterfaceName>System.Security.Permissions.IUnrestrictedPermission</InterfaceName>
23 <para> Controls access to Internet resources.</para>
26 <para>The XML encoding of a <see cref="T:System.Net.WebPermission" /> instance
27 is defined below in EBNF format. The following conventions are used:</para>
31 <para> All non-literals in the grammar below are shown in normal type.</para>
36 <para> All literals are in bold font. </para>
40 <para> The following meta-language symbols are used: </para>
45 '*' represents a meta-language symbol suffixing an
46 expression that can appear zero or more times.</term>
51 '?' represents a meta-language symbol suffixing an
52 expression that can appear zero or one time.</term>
57 '+' represents a meta-language symbol suffixing an
58 expression that can appear one or more times.</term>
63 '(',')' is used to group literals, non-literals or a
64 mixture of literals and non-literals.</term>
69 '|' denotes an exclusive disjunction between two
75 '::= ' denotes a production rule where a left hand
76 non-literal is replaced by a right hand expression containing literals,
77 non-literals or both.</term>
80 <para> BuildVersion refers to the build version of the shipping CLI. This is
81 a dotted build number such as '2412.0'.</para>
82 <para>ECMAPubKeyToken ::= <see langword="b77a5c561934e089" /></para>
83 <para>HostName refers to a host name such as <c>www.contoso.com</c> . </para>
84 <para>Portnumber denotes a <see cref="T:System.Int32" /> value indicating a port. </para>
85 <para>TransportProtocol ::= <see langword="1" /> |
86 <see langword="2" /> | <see langword="3 " /> /*1= UDP , 2 = TCP, 3 = both */ </para>
88 <para>WebPermissionXML ::= </para>
90 <see langword="<IPermission " />
93 <see langword="class=" " />
96 <see langword="System.Net.WebPermission," />
99 <see langword="System," />
102 <see langword="Version=1.0." />BuildVersion<see langword="," /></para>
104 <see langword="Culture=neutral," />
107 <see langword="PublicKeyToken=" />ECMAPubKeyToken<see langword="" " /></para>
109 <see langword="version="1" " />
113 <see langword="Unrestricted="true"/> " />
118 <para>(<see langword="<ConnectAccess> " /></para>
121 <see langword="<URI>" />HostName<see langword="#" />PortNumber<see langword="#" />TransportProtocol<see langword="</URI> " /></para>
124 <see langword="</ConnectAccess> " />
127 <see langword="</IPermission> " />
132 <para>(<see langword="<AcceptAccess> " /></para>
135 <see langword="<URI>" />HostName<see langword="#" />PortNumber<see langword="#" />TransportProtocol<see langword="</URI> " /></para>
136 <para>)+<see langword=" " /></para>
138 <see langword="</AcceptAccess> " />
141 <see langword="</IPermission> " />
146 <see langword="/> " />
152 <Member MemberName=".ctor">
153 <MemberSignature Language="C#" Value="public WebPermission ();" />
154 <MemberType>Constructor</MemberType>
157 <summary>To be added.</summary>
158 <remarks>To be added.</remarks>
161 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
162 <AssemblyVersion>2.0.0.0</AssemblyVersion>
165 <Member MemberName=".ctor">
166 <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(valuetype System.Security.Permissions.PermissionState state)" />
167 <MemberSignature Language="C#" Value="public WebPermission (System.Security.Permissions.PermissionState state);" />
168 <MemberType>Constructor</MemberType>
171 <Parameter Name="state" Type="System.Security.Permissions.PermissionState" />
175 <para>A <see cref="T:System.Security.Permissions.PermissionState" /> value. </para>
178 <para>Constructs and initializes a new instance of the <see cref="T:System.Net.WebPermission" /> class with the specified <see cref="T:System.Security.Permissions.PermissionState" />
182 <block subset="none" type="note">
183 <para>This constructor creates either fully restricted (<see cref="F:System.Security.Permissions.PermissionState.None" />)
184 or <see cref="F:System.Security.Permissions.PermissionState.Unrestricted" /> access to Internet
189 <Excluded>0</Excluded>
191 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
192 <AssemblyVersion>2.0.0.0</AssemblyVersion>
195 <Member MemberName=".ctor">
196 <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(valuetype System.Net.NetworkAccess access, string uriString)" />
197 <MemberSignature Language="C#" Value="public WebPermission (System.Net.NetworkAccess access, string uriString);" />
198 <MemberType>Constructor</MemberType>
201 <Parameter Name="access" Type="System.Net.NetworkAccess" />
202 <Parameter Name="uriString" Type="System.String" />
205 <param name="access">A <see cref="T:System.Net.NetworkAccess" /> value indicating the type of access to secure. </param>
206 <param name="uriString">A <see cref="T:System.String" /> that represents the URI to grant access rights to. <block subset="none" type="note">For more information on the format of this string, see <see cref="T:System.Uri" />.</block></param>
208 <para> Constructs and initializes a new instance of the <see cref="T:System.Net.WebPermission" /> class that secures
209 access to the specified
212 <remarks>To be added.</remarks>
213 <exception cref="T:System.ArgumentNullException">
214 <paramref name="uriString" /> is <see langword="null" /> .</exception>
216 <Excluded>0</Excluded>
218 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
219 <AssemblyVersion>2.0.0.0</AssemblyVersion>
222 <Member MemberName=".ctor">
223 <MemberSignature Language="C#" Value="public WebPermission (System.Net.NetworkAccess access, System.Text.RegularExpressions.Regex uriRegex);" />
224 <MemberType>Constructor</MemberType>
226 <Parameter Name="access" Type="System.Net.NetworkAccess" />
227 <Parameter Name="uriRegex" Type="System.Text.RegularExpressions.Regex" />
230 <param name="access">To be added.</param>
231 <param name="uriRegex">To be added.</param>
232 <summary>To be added.</summary>
233 <remarks>To be added.</remarks>
236 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
237 <AssemblyVersion>2.0.0.0</AssemblyVersion>
240 <Member MemberName="AcceptList">
241 <MemberSignature Language="C#" Value="public System.Collections.IEnumerator AcceptList { get; }" />
242 <MemberType>Property</MemberType>
244 <ReturnType>System.Collections.IEnumerator</ReturnType>
247 <summary>To be added.</summary>
248 <value>To be added.</value>
249 <remarks>To be added.</remarks>
252 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
253 <AssemblyVersion>2.0.0.0</AssemblyVersion>
256 <Member MemberName="AddPermission">
257 <MemberSignature Language="C#" Value="public void AddPermission (System.Net.NetworkAccess access, string uriString);" />
258 <MemberType>Method</MemberType>
260 <ReturnType>System.Void</ReturnType>
263 <Parameter Name="access" Type="System.Net.NetworkAccess" />
264 <Parameter Name="uriString" Type="System.String" />
267 <param name="access">To be added.</param>
268 <param name="uriString">To be added.</param>
269 <summary>To be added.</summary>
270 <remarks>To be added.</remarks>
273 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
274 <AssemblyVersion>2.0.0.0</AssemblyVersion>
277 <Member MemberName="AddPermission">
278 <MemberSignature Language="C#" Value="public void AddPermission (System.Net.NetworkAccess access, System.Text.RegularExpressions.Regex uriRegex);" />
279 <MemberType>Method</MemberType>
281 <ReturnType>System.Void</ReturnType>
284 <Parameter Name="access" Type="System.Net.NetworkAccess" />
285 <Parameter Name="uriRegex" Type="System.Text.RegularExpressions.Regex" />
288 <param name="access">To be added.</param>
289 <param name="uriRegex">To be added.</param>
290 <summary>To be added.</summary>
291 <remarks>To be added.</remarks>
294 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
295 <AssemblyVersion>2.0.0.0</AssemblyVersion>
298 <Member MemberName="ConnectList">
299 <MemberSignature Language="C#" Value="public System.Collections.IEnumerator ConnectList { get; }" />
300 <MemberType>Property</MemberType>
302 <ReturnType>System.Collections.IEnumerator</ReturnType>
305 <summary>To be added.</summary>
306 <value>To be added.</value>
307 <remarks>To be added.</remarks>
310 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
311 <AssemblyVersion>2.0.0.0</AssemblyVersion>
314 <Member MemberName="Copy">
315 <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission Copy()" />
316 <MemberSignature Language="C#" Value="public override System.Security.IPermission Copy ();" />
317 <MemberType>Method</MemberType>
319 <ReturnType>System.Security.IPermission</ReturnType>
324 <para>Returns a new <see cref="T:System.Net.WebPermission" /> object containing the same values as the current
328 <para> A new <see cref="T:System.Net.WebPermission" /> instance
329 containing the same values as the current instance.
333 <block subset="none" type="note">
334 <para>The object returned by this method represents the same access to resources as
335 the current instance.</para>
336 <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.Copy" qualify="true" /> and is implemented to
337 support the <see cref="T:System.Security.IPermission" /> interface.</para>
341 <Excluded>0</Excluded>
343 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
344 <AssemblyVersion>2.0.0.0</AssemblyVersion>
347 <Member MemberName="FromXml">
348 <MemberSignature Language="ILASM" Value=".method public hidebysig virtual void FromXml(class System.Security.SecurityElement securityElement)" />
349 <MemberSignature Language="C#" Value="public override void FromXml (System.Security.SecurityElement securityElement);" />
350 <MemberType>Method</MemberType>
352 <ReturnType>System.Void</ReturnType>
355 <Parameter Name="securityElement" Type="System.Security.SecurityElement" />
358 <param name="securityElement">
359 <para>A <see cref="T:System.Security.SecurityElement" /> instance containing the XML encoding to use to reconstruct the state of a <see cref="T:System.Net.WebPermission" /> object.</para>
362 <para>Reconstructs the state of a <see cref="T:System.Net.WebPermission" /> object using the specified XML
366 <para>The state of the current instance is changed to the state encoded in
367 <paramref name="securityElement" />.</para>
368 <block subset="none" type="note">
369 <para>For the XML encoding for this class, see the <see cref="T:System.Net.WebPermission" /> class
371 <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.FromXml(System.Security.SecurityElement)" qualify="true" /> .</para>
374 <exception cref="T:System.ArgumentNullException">
376 <paramref name="securityElement " />is <see langword="null" />.</para>
378 <exception cref="T:System.ArgumentException">
380 <paramref name="securityElement " />does not contain the encoding for a <see cref="T:System.Net.WebPermission" /> instance.</para>
383 <Excluded>0</Excluded>
385 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
386 <AssemblyVersion>2.0.0.0</AssemblyVersion>
389 <Member MemberName="Intersect">
390 <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission Intersect(class System.Security.IPermission target)" />
391 <MemberSignature Language="C#" Value="public override System.Security.IPermission Intersect (System.Security.IPermission target);" />
392 <MemberType>Method</MemberType>
394 <ReturnType>System.Security.IPermission</ReturnType>
397 <Parameter Name="target" Type="System.Security.IPermission" />
400 <param name="target">A <see cref="T:System.Net.WebPermission" /> instance to intersect with the current instance.</param>
402 <para>Returns a new <see cref="T:System.Net.WebPermission" /> object that is the intersection of the current
403 instance and the specified object. </para>
406 <para>A new <see cref="T:System.Net.WebPermission" /> instance that represents the intersection of the
407 current instance and <paramref name="target" />. If the intersection is
408 empty, returns <see langword="null" />. If the
409 current instance is unrestricted, returns a copy of <paramref name="target" />. If
410 <paramref name="target" /> is unrestricted, returns a copy of the current instance.</para>
413 <block subset="none" type="note">
414 <para>The intersection of two permissions is a permission that secures the
415 resources and operations secured by both permissions. Specifically, it
416 represents the minimum permission such that any demand that passes both
417 permissions will also pass their intersection.</para>
418 <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.Intersect(System.Security.IPermission)" qualify="true" /> and is implemented to
419 support the <see cref="T:System.Security.IPermission" /> interface.</para>
422 <exception cref="T:System.ArgumentNullException">
423 <paramref name="target " />is <see langword="null" />.</exception>
424 <exception cref="T:System.ArgumentException">
425 <paramref name="target" /> is not <see langword="null" /> and is not of type <see cref="T:System.Net.WebPermission" /> .</exception>
427 <Excluded>0</Excluded>
429 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
430 <AssemblyVersion>2.0.0.0</AssemblyVersion>
433 <Member MemberName="IsSubsetOf">
434 <MemberSignature Language="ILASM" Value=".method public hidebysig virtual bool IsSubsetOf(class System.Security.IPermission target)" />
435 <MemberSignature Language="C#" Value="public override bool IsSubsetOf (System.Security.IPermission target);" />
436 <MemberType>Method</MemberType>
438 <ReturnType>System.Boolean</ReturnType>
441 <Parameter Name="target" Type="System.Security.IPermission" />
444 <param name="target">A <see cref="T:System.Net.WebPermission" /> instance that is to be tested for the subset relationship.</param>
446 <para>Determines whether the current instance is a subset of the specified
451 <see langword="true" /> if the current instance is a subset of <paramref name="target" /> ;
452 otherwise,<see langword=" false" />. If target is null, return
453 <see langword="false" />. If the current instance is unrestricted, and
454 <paramref name="target" /> is not, returns <see langword="false" />. If <paramref name="target" /> is
455 unrestricted, returns <see langword="true" />.</para>
458 <block subset="none" type="note">
459 <para>The current instance is a subset of <paramref name="target" /> if the current instance
460 specifies a set of accesses to resources that is wholly contained by
461 <paramref name="target" />. For example, a permission that represents read access to a file
462 is a subset of a permission that represents read and write access to the file. </para>
463 <para>If this method returns <see langword="true" /> , the
464 current instance describes access to internet resources that is also
465 described by <paramref name="target" />
467 <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.IsSubsetOf(System.Security.IPermission)" qualify="true" /> and is implemented to
468 support the <see cref="T:System.Security.IPermission" /> interface.</para>
471 <exception cref="T:System.ArgumentException">
473 <paramref name="target " />is not of type <see cref="T:System.Net.WebPermission" />.</para>
476 <Excluded>0</Excluded>
478 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
479 <AssemblyVersion>2.0.0.0</AssemblyVersion>
482 <Member MemberName="IsUnrestricted">
483 <MemberSignature Language="C#" Value="public bool IsUnrestricted ();" />
484 <MemberType>Method</MemberType>
486 <ReturnType>System.Boolean</ReturnType>
490 <summary>To be added.</summary>
491 <returns>To be added.</returns>
492 <remarks>To be added.</remarks>
495 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
496 <AssemblyVersion>2.0.0.0</AssemblyVersion>
499 <Member MemberName="ToXml">
500 <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.SecurityElement ToXml()" />
501 <MemberSignature Language="C#" Value="public override System.Security.SecurityElement ToXml ();" />
502 <MemberType>Method</MemberType>
504 <ReturnType>System.Security.SecurityElement</ReturnType>
509 <para>Returns the XML encoding of the current instance.</para>
512 <para>A <see cref="T:System.Security.SecurityElement" /> containing the XML encoding of the state of the
513 current instance.</para>
516 <block subset="none" type="note">
517 <para>For the XML encoding for this class, see the <see cref="T:System.Net.WebPermission" /> class page.</para>
518 <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.ToXml" qualify="true" /> .</para>
522 <Excluded>0</Excluded>
524 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
525 <AssemblyVersion>2.0.0.0</AssemblyVersion>
528 <Member MemberName="Union">
529 <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission Union(class System.Security.IPermission target)" />
530 <MemberSignature Language="C#" Value="public override System.Security.IPermission Union (System.Security.IPermission target);" />
531 <MemberType>Method</MemberType>
533 <ReturnType>System.Security.IPermission</ReturnType>
536 <Parameter Name="target" Type="System.Security.IPermission" />
539 <param name="target">The <see cref="T:System.Net.WebPermission" /> instance to combine with the current instance.</param>
541 <para>Returns a new <see cref="T:System.Net.WebPermission" /> object that is the union of the current instance and
542 the specified object.</para>
545 <para>A new <see cref="T:System.Net.WebPermission" /> instance that represents the union of the current
546 instance and <paramref name="target" />. If the current instance
547 or <paramref name="target" /> is unrestricted, returns a <see cref="T:System.Net.WebPermission" /> instance that is unrestricted.</para>
550 <block subset="none" type="note">
551 <para>The result of a call to <see cref="M:System.Net.WebPermission.Union(System.Security.IPermission)" /> is a permission that represents all of
552 the access to permissions represented by the current instance as well as the
553 permissions represented by <paramref name="target" />. Any demand that passes either the
554 current instance or <paramref name="target " />passes their union.</para>
555 <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.Union(System.Security.IPermission)" qualify="true" /> and is implemented to
556 support the <see cref="T:System.Security.IPermission" /> interface.</para>
559 <exception cref="T:System.ArgumentNullException">
560 <paramref name="target " />is <see langword="null" />.</exception>
561 <exception cref="T:System.ArgumentException">
562 <paramref name="target" /> is not <see langword="null" /> and is not of type <see cref="T:System.Net.WebPermission" /> .</exception>
564 <Excluded>0</Excluded>
566 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
567 <AssemblyVersion>2.0.0.0</AssemblyVersion>
571 <TypeExcluded>0</TypeExcluded>