/
WebPermission.xml
962 lines (849 loc) · 63.4 KB
/
WebPermission.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
<Type Name="WebPermission" FullName="System.Net.WebPermission">
<TypeSignature Language="C#" Value="public sealed class WebPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit WebPermission extends System.Security.CodeAccessPermission implements class System.Security.Permissions.IUnrestrictedPermission" FrameworkAlternate="dotnet-plat-ext-2.1;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0;dotnet-plat-ext-3.1;dotnet-plat-ext-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netstandard-2.0;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0" />
<TypeSignature Language="DocId" Value="T:System.Net.WebPermission" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class WebPermission
Inherits CodeAccessPermission
Implements IUnrestrictedPermission" />
<TypeSignature Language="F#" Value="type WebPermission = class
 inherit CodeAccessPermission
 interface IUnrestrictedPermission" />
<TypeSignature Language="C++ CLI" Value="public ref class WebPermission sealed : System::Security::CodeAccessPermission, System::Security::Permissions::IUnrestrictedPermission" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi serializable sealed beforefieldinit WebPermission extends System.Security.CodeAccessPermission implements class System.Security.Permissions.IUnrestrictedPermission" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="System.Security.Permissions" FromVersion="9.0.0.0" To="System" ToVersion="4.0.0.0" FrameworkAlternate="netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
</TypeForwardingChain>
<Base>
<BaseTypeName>System.Security.CodeAccessPermission</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Security.Permissions.IUnrestrictedPermission</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute FrameworkAlternate="dotnet-plat-ext-5.0;net-6.0;net-7.0;net-8.0;net-9.0;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Serializable]</AttributeName>
<AttributeName Language="F#">[<System.Serializable>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Controls rights to access HTTP Internet resources.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]
<xref:System.Net.WebPermission> provides a set of methods and properties to control access to Internet resources. You can use a <xref:System.Net.WebPermission> to provide either restricted or unrestricted access to your resource, based on the <xref:System.Security.Permissions.PermissionState> that is set when the <xref:System.Net.WebPermission> is created.
Create a <xref:System.Net.WebPermission> instance by calling its constructor using one of the following sets of parameters:
- No parameters. The default <xref:System.Security.Permissions.PermissionState> is <xref:System.Security.Permissions.PermissionState.None>.
- A <xref:System.Security.Permissions.PermissionState>. Specify either <xref:System.Security.Permissions.PermissionState.Unrestricted> to allow any URI to be used in the target class, or <xref:System.Security.Permissions.PermissionState.None> to allow access only to URIs that you specify through the use of the <xref:System.Net.WebPermission.AddPermission%2A> method.
- A <xref:System.Net.NetworkAccess> value and a URI string. The specified URI has permissions granted by the <xref:System.Net.NetworkAccess> value.
- A <xref:System.Net.NetworkAccess> specifier and URI regular expression.
The <xref:System.Net.WebPermission.ConnectList%2A> and <xref:System.Net.WebPermission.AcceptList%2A> hold the URIs to which you have granted access permission. To add a URI to either of these lists, use <xref:System.Net.WebPermission.AddPermission%2A>. If you pass <xref:System.Net.NetworkAccess.Accept> as the <xref:System.Net.NetworkAccess> parameter, the URI will be added to the <xref:System.Net.WebPermission.AcceptList%2A>. <xref:System.Net.WebPermission> will allow connections to your target class with URIs matching the <xref:System.Net.WebPermission.AcceptList%2A>.
> [!CAUTION]
> To deny access to an Internet resource, you must deny access to all the possible paths to that resource. This requires calling <xref:System.Net.WebPermission.%23ctor%2A?displayProperty=nameWithType> with state parameter set to <xref:System.Security.CodeAccessPermission.Deny%2A>. A better approach is to allow access to the specific resource only. For more information about this subject, refer to the [Using the Deny Method](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/hk3b9142(v=vs.100)) topic.
> [!NOTE]
> You need to deny access using only the resource canonical path. There is no need to use all the path's syntactical variations.
> [!NOTE]
> User name and default port information is stripped from the <xref:System.Uri> before the comparison with the regular expression argument that is supplied to the <xref:System.Net.WebPermission.%23ctor%28System.Net.NetworkAccess%2CSystem.Text.RegularExpressions.Regex%29> constructor. If the regular expression contains user information or the default port number, then all incoming <xref:System.Uri>s will fail to match the regular expression.
## Examples
The following example demonstrates how to create a new instance of <xref:System.Net.WebPermission> using a <xref:System.Text.RegularExpressions.Regex>. Additional hosts are added to the connect and accept list of <xref:System.Net.WebPermission>. Finally, the connect and accept list are displayed to the console.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_Regex/CPP/regex.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/Overview/regex.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_Regex/VB/regex.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="T:System.Security.CodeAccessPermission" />
<altmember cref="T:System.Security.Permissions.PermissionState" />
<altmember cref="T:System.Net.NetworkAccess" />
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Creates a new instance of the <see cref="T:System.Net.WebPermission" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public WebPermission ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 WebPermission();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Creates a new instance of the <see cref="T:System.Net.WebPermission" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Creates a new instance of the <xref:System.Net.WebPermission> class. This constructor creates an empty permission that does not grant any rights.
]]></format>
</remarks>
<altmember cref="M:System.Net.WebPermission.IsUnrestricted" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public WebPermission (System.Security.Permissions.PermissionState state);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Security.Permissions.PermissionState state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.#ctor(System.Security.Permissions.PermissionState)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (state As PermissionState)" />
<MemberSignature Language="F#" Value="new System.Net.WebPermission : System.Security.Permissions.PermissionState -> System.Net.WebPermission" Usage="new System.Net.WebPermission state" />
<MemberSignature Language="C++ CLI" Value="public:
 WebPermission(System::Security::Permissions::PermissionState state);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="state" Type="System.Security.Permissions.PermissionState" />
</Parameters>
<Docs>
<param name="state">A <see cref="T:System.Security.Permissions.PermissionState" /> value.</param>
<summary>Creates a new instance of the <see cref="T:System.Net.WebPermission" /> class that passes all demands or fails all demands.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value of the `state` parameter is either <xref:System.Security.Permissions.PermissionState.None?displayProperty=nameWithType> or <xref:System.Security.Permissions.PermissionState.Unrestricted?displayProperty=nameWithType>, respectively yielding fully restricted or fully unrestricted access to all security variables. If you specify <xref:System.Security.Permissions.PermissionState.None?displayProperty=nameWithType>, then you can give access to individual URIs using <xref:System.Net.WebPermission.AddPermission%2A>.
## Examples
The following example creates an instance of <xref:System.Net.WebPermission> and gives access rights to specific URLs.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_Copy/CPP/webpermission_copy.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/.ctor/webpermission_copy.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_Copy/VB/webpermission_copy.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="F:System.Security.Permissions.PermissionState.Unrestricted" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public WebPermission (System.Net.NetworkAccess access, string uriString);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Net.NetworkAccess access, string uriString) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.#ctor(System.Net.NetworkAccess,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (access As NetworkAccess, uriString As String)" />
<MemberSignature Language="F#" Value="new System.Net.WebPermission : System.Net.NetworkAccess * string -> System.Net.WebPermission" Usage="new System.Net.WebPermission (access, uriString)" />
<MemberSignature Language="C++ CLI" Value="public:
 WebPermission(System::Net::NetworkAccess access, System::String ^ uriString);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="access" Type="System.Net.NetworkAccess" />
<Parameter Name="uriString" Type="System.String" />
</Parameters>
<Docs>
<param name="access">A NetworkAccess value that indicates what kind of access to grant to the specified URI. <see cref="F:System.Net.NetworkAccess.Accept" /> indicates that the application is allowed to accept connections from the Internet on a local resource. <see cref="F:System.Net.NetworkAccess.Connect" /> indicates that the application is allowed to connect to specific Internet resources.</param>
<param name="uriString">A URI string to which access rights are granted.</param>
<summary>Initializes a new instance of the <see cref="T:System.Net.WebPermission" /> class with the specified access rights for the specified URI.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor initializes a <xref:System.Net.WebPermission> and grants its target permission to either make a remote host connection or accept a remote host connection using the URI described by the `uriString` parameter.
## Examples
The following example creates a new instance of <xref:System.Net.WebPermission> with connect rights for the specified URI.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_Union/CPP/webpermission_union.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/.ctor/webpermission_union.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_Union/VB/webpermission_union.vb" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="uriString" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Text.RegularExpressions.Regex" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public WebPermission (System.Net.NetworkAccess access, System.Text.RegularExpressions.Regex uriRegex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Net.NetworkAccess access, class System.Text.RegularExpressions.Regex uriRegex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.#ctor(System.Net.NetworkAccess,System.Text.RegularExpressions.Regex)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (access As NetworkAccess, uriRegex As Regex)" />
<MemberSignature Language="F#" Value="new System.Net.WebPermission : System.Net.NetworkAccess * System.Text.RegularExpressions.Regex -> System.Net.WebPermission" Usage="new System.Net.WebPermission (access, uriRegex)" />
<MemberSignature Language="C++ CLI" Value="public:
 WebPermission(System::Net::NetworkAccess access, System::Text::RegularExpressions::Regex ^ uriRegex);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="access" Type="System.Net.NetworkAccess" />
<Parameter Name="uriRegex" Type="System.Text.RegularExpressions.Regex" />
</Parameters>
<Docs>
<param name="access">A <see cref="T:System.Net.NetworkAccess" /> value that indicates what kind of access to grant to the specified URI. <see cref="F:System.Net.NetworkAccess.Accept" /> indicates that the application is allowed to accept connections from the Internet on a local resource. <see cref="F:System.Net.NetworkAccess.Connect" /> indicates that the application is allowed to connect to specific Internet resources.</param>
<param name="uriRegex">A regular expression that describes the URI to which access is to be granted.</param>
<summary>Initializes a new instance of the <see cref="T:System.Net.WebPermission" /> class with the specified access rights for the specified URI regular expression.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor initializes a <xref:System.Net.WebPermission> and grants its target permission to either make a remote host connection or accept a remote host connection using the URI described by the `uriRegex` parameter.
> [!NOTE]
> It is recommended that you create `uriRegex` using the <xref:System.Text.RegularExpressions.RegexOptions.IgnoreCase?displayProperty=nameWithType>, <xref:System.Text.RegularExpressions.RegexOptions.Compiled?displayProperty=nameWithType>, and <xref:System.Text.RegularExpressions.RegexOptions.Singleline?displayProperty=nameWithType> flags.
> [!NOTE]
> A candidate URI string is checked against the list of relevant regular expressions (<xref:System.Net.WebPermission.AcceptList%2A> or <xref:System.Net.WebPermission.ConnectList%2A>) in two ways. First, the candidate URI string is checked against the appropriate list; then, if there is no match, the candidate URI string is converted into a <xref:System.Uri> and checked against the appropriate list.
## Examples
The following example creates a new instance of <xref:System.Net.WebPermission> with connect rights for the specified <xref:System.Text.RegularExpressions.Regex?displayProperty=nameWithType>.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_Constructor4/CPP/webpermission_constructor4.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/.ctor/webpermission_constructor4.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_Constructor4/VB/webpermission_constructor4.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="T:System.Text.RegularExpressions.Regex" />
</Docs>
</Member>
<Member MemberName="AcceptList">
<MemberSignature Language="C#" Value="public System.Collections.IEnumerator AcceptList { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.IEnumerator AcceptList" />
<MemberSignature Language="DocId" Value="P:System.Net.WebPermission.AcceptList" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AcceptList As IEnumerator" />
<MemberSignature Language="F#" Value="member this.AcceptList : System.Collections.IEnumerator" Usage="System.Net.WebPermission.AcceptList" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Collections::IEnumerator ^ AcceptList { System::Collections::IEnumerator ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Docs>
<summary>This property returns an enumeration of a single accept permissions held by this <see cref="T:System.Net.WebPermission" />. The possible objects types contained in the returned enumeration are <see cref="T:System.String" /> and <see cref="T:System.Text.RegularExpressions.Regex" />.</summary>
<value>The <see cref="T:System.Collections.IEnumerator" /> interface that contains accept permissions.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property gets a list of local resources permitted by this <xref:System.Net.WebPermission>. The class to which you have applied <xref:System.Net.WebPermission> only has permission to receive an incoming connection to local resources found in this list.
> [!NOTE]
> You can add URIs to this list using <xref:System.Net.WebPermission.AddPermission%2A>.
> [!NOTE]
> A candidate URI string is checked against the list of relevant regular expressions (<xref:System.Net.WebPermission.AcceptList%2A> or <xref:System.Net.WebPermission.ConnectList%2A>) in two ways. First, the candidate URI string is checked against the appropriate list; then, if there is no match, the candidate URI string is converted into a <xref:System.Uri> and checked against the appropriate list.
## Examples
The following example prints the URLs in the <xref:System.Net.WebPermission.AcceptList%2A> to the console.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_AcceptConnectList/CPP/webpermission_acceptconnectlist.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/AcceptList/webpermission_acceptconnectlist.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_AcceptConnectList/VB/webpermission_acceptconnectlist.vb" id="Snippet2":::
]]></format>
</remarks>
<altmember cref="M:System.Net.WebPermission.AddPermission(System.Net.NetworkAccess,System.String)" />
</Docs>
</Member>
<MemberGroup MemberName="AddPermission">
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Adds the specified URI with the specified access rights to the current <see cref="T:System.Net.WebPermission" />.</summary>
</Docs>
</MemberGroup>
<Member MemberName="AddPermission">
<MemberSignature Language="C#" Value="public void AddPermission (System.Net.NetworkAccess access, string uriString);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddPermission(valuetype System.Net.NetworkAccess access, string uriString) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.AddPermission(System.Net.NetworkAccess,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub AddPermission (access As NetworkAccess, uriString As String)" />
<MemberSignature Language="F#" Value="member this.AddPermission : System.Net.NetworkAccess * string -> unit" Usage="webPermission.AddPermission (access, uriString)" />
<MemberSignature Language="C++ CLI" Value="public:
 void AddPermission(System::Net::NetworkAccess access, System::String ^ uriString);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="access" Type="System.Net.NetworkAccess" />
<Parameter Name="uriString" Type="System.String" />
</Parameters>
<Docs>
<param name="access">A <see cref="T:System.Net.NetworkAccess" /> that specifies the access rights that are granted to the URI.</param>
<param name="uriString">A string that describes the URI to which access rights are granted.</param>
<summary>Adds the specified URI string with the specified access rights to the current <see cref="T:System.Net.WebPermission" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you have specified <xref:System.Security.Permissions.PermissionState.None> as the <xref:System.Security.Permissions.PermissionState>, use <xref:System.Net.WebPermission.AddPermission%2A> to permit the use of `uriString` in the target class. The way that `uriString` can be used by the target class is specified by `access`. Specify <xref:System.Net.NetworkAccess.Accept> as the access parameter to add the URI specified by the `uriString` parameter to the list of URI accept strings, or specify <xref:System.Net.NetworkAccess.Connect> as the access parameter to add the URI to the list of URI connect strings.
> [!NOTE]
> Calling <xref:System.Net.WebPermission.AddPermission%2A> on <xref:System.Security.Permissions.PermissionState.Unrestricted><xref:System.Net.WebPermission> will have no effect, because permission is granted to all URIs.
> [!NOTE]
> A candidate URI string is checked against the list of relevant regular expressions (<xref:System.Net.WebPermission.AcceptList%2A> or <xref:System.Net.WebPermission.ConnectList%2A>) in two ways. First, the candidate URI string is checked against the appropriate list; then, if there is no match, the candidate URI string is converted into a <xref:System.Uri> and checked against the appropriate list.
## Examples
The following example demonstrates how to add access rights to particular URL strings.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_Intersect/CPP/webpermission_intersect.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/AddPermission/webpermission_intersect.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_Intersect/VB/webpermission_intersect.vb" id="Snippet2":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="uriString" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Net.NetworkAccess" />
</Docs>
</Member>
<Member MemberName="AddPermission">
<MemberSignature Language="C#" Value="public void AddPermission (System.Net.NetworkAccess access, System.Text.RegularExpressions.Regex uriRegex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddPermission(valuetype System.Net.NetworkAccess access, class System.Text.RegularExpressions.Regex uriRegex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.AddPermission(System.Net.NetworkAccess,System.Text.RegularExpressions.Regex)" />
<MemberSignature Language="VB.NET" Value="Public Sub AddPermission (access As NetworkAccess, uriRegex As Regex)" />
<MemberSignature Language="F#" Value="member this.AddPermission : System.Net.NetworkAccess * System.Text.RegularExpressions.Regex -> unit" Usage="webPermission.AddPermission (access, uriRegex)" />
<MemberSignature Language="C++ CLI" Value="public:
 void AddPermission(System::Net::NetworkAccess access, System::Text::RegularExpressions::Regex ^ uriRegex);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="access" Type="System.Net.NetworkAccess" />
<Parameter Name="uriRegex" Type="System.Text.RegularExpressions.Regex" />
</Parameters>
<Docs>
<param name="access">A NetworkAccess that specifies the access rights that are granted to the URI.</param>
<param name="uriRegex">A regular expression that describes the set of URIs to which access rights are granted.</param>
<summary>Adds the specified URI with the specified access rights to the current <see cref="T:System.Net.WebPermission" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you have specified <xref:System.Security.Permissions.PermissionState.None> as the <xref:System.Security.Permissions.PermissionState>, use <xref:System.Net.WebPermission.AddPermission%2A> to allow the use of `uriRegex` in the target class. Specify <xref:System.Net.NetworkAccess.Accept> as the `access` parameter to add the URI specified by the `uriRegex` parameter to the list of URI accept strings, or specify <xref:System.Net.NetworkAccess.Connect> as the access parameter to add the URI to the list of URI connect strings.
> [!NOTE]
> Calling <xref:System.Net.WebPermission.AddPermission%2A> on an <xref:System.Security.Permissions.PermissionState.Unrestricted><xref:System.Net.WebPermission> instance will have no effect as permission is granted to all URIs.
> [!NOTE]
> It is recommended that you create `uriRegex` using the <xref:System.Text.RegularExpressions.RegexOptions.IgnoreCase?displayProperty=nameWithType>, <xref:System.Text.RegularExpressions.RegexOptions.Compiled?displayProperty=nameWithType>, and <xref:System.Text.RegularExpressions.RegexOptions.Singleline?displayProperty=nameWithType> flags.
> [!NOTE]
> A candidate URI string is checked against the list of relevant regular expressions (<xref:System.Net.WebPermission.AcceptList%2A> or <xref:System.Net.WebPermission.ConnectList%2A>) in two ways. First, the candidate URI string is checked against the appropriate list; then, if there is no match, the candidate URI string is converted into a <xref:System.Uri> and checked against the appropriate list.
## Examples
The following example uses <xref:System.Net.WebPermission.AddPermission%2A> to give access rights for the specified URI.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_IsSubset/CPP/webpermission_issubset.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/AddPermission/webpermission_issubset.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_IsSubset/VB/webpermission_issubset.vb" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="uriRegex" /> parameter is <see langword="null" />.</exception>
<altmember cref="T:System.Net.NetworkAccess" />
</Docs>
</Member>
<Member MemberName="ConnectList">
<MemberSignature Language="C#" Value="public System.Collections.IEnumerator ConnectList { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.IEnumerator ConnectList" />
<MemberSignature Language="DocId" Value="P:System.Net.WebPermission.ConnectList" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ConnectList As IEnumerator" />
<MemberSignature Language="F#" Value="member this.ConnectList : System.Collections.IEnumerator" Usage="System.Net.WebPermission.ConnectList" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Collections::IEnumerator ^ ConnectList { System::Collections::IEnumerator ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Docs>
<summary>This property returns an enumeration of a single connect permissions held by this <see cref="T:System.Net.WebPermission" />. The possible objects types contained in the returned enumeration are <see cref="T:System.String" /> and <see cref="T:System.Text.RegularExpressions.Regex" />.</summary>
<value>The <see cref="T:System.Collections.IEnumerator" /> interface that contains connect permissions.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property gets a list of remote resources that are permitted by this <xref:System.Net.WebPermission>. The class to which you have applied <xref:System.Net.WebPermission> only has permission to connect with resources found in this list.
> [!NOTE]
> You can add URIs to this list using <xref:System.Net.WebPermission.AddPermission%2A>.
> [!NOTE]
> A candidate URI string is checked against the list of relevant regular expressions (<xref:System.Net.WebPermission.AcceptList%2A> or <xref:System.Net.WebPermission.ConnectList%2A>) in two ways. First, the candidate URI string is checked against the appropriate list; then, if there is no match, the candidate URI string is converted into a <xref:System.Uri> and checked against the appropriate list.
## Examples
The following example prints the URLs in the <xref:System.Net.WebPermission.ConnectList%2A> to the console.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_AcceptConnectList/CPP/webpermission_acceptconnectlist.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/AcceptList/webpermission_acceptconnectlist.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_AcceptConnectList/VB/webpermission_acceptconnectlist.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="M:System.Net.WebPermission.AddPermission(System.Net.NetworkAccess,System.String)" />
</Docs>
</Member>
<Member MemberName="Copy">
<MemberSignature Language="C#" Value="public override System.Security.IPermission Copy ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Security.IPermission Copy() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.Copy" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Copy () As IPermission" />
<MemberSignature Language="F#" Value="override this.Copy : unit -> System.Security.IPermission" Usage="webPermission.Copy " />
<MemberSignature Language="C++ CLI" Value="public:
 override System::Security::IPermission ^ Copy();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.IPermission</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a copy of a <see cref="T:System.Net.WebPermission" />.</summary>
<returns>A new instance of the <see cref="T:System.Net.WebPermission" /> class that has the same values as the original.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Security.IPermission> returned by this method represents the same access to resources as the original <xref:System.Net.WebPermission>. This method overrides <xref:System.Security.CodeAccessPermission.Copy%2A> and is implemented to support the <xref:System.Security.IPermission> interface.
## Examples
The following example demonstrates how to create a second instance of <xref:System.Net.WebPermission> using <xref:System.Net.WebPermission.Copy%2A>. This second instance is identical to the first.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_Copy/CPP/webpermission_copy.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/.ctor/webpermission_copy.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_Copy/VB/webpermission_copy.vb" id="Snippet2":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="FromXml">
<MemberSignature Language="C#" Value="public override void FromXml (System.Security.SecurityElement securityElement);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void FromXml(class System.Security.SecurityElement securityElement) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.FromXml(System.Security.SecurityElement)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub FromXml (securityElement As SecurityElement)" />
<MemberSignature Language="F#" Value="override this.FromXml : System.Security.SecurityElement -> unit" Usage="webPermission.FromXml securityElement" />
<MemberSignature Language="C++ CLI" Value="public:
 override void FromXml(System::Security::SecurityElement ^ securityElement);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="securityElement" Type="System.Security.SecurityElement" />
</Parameters>
<Docs>
<param name="securityElement">The XML encoding from which to reconstruct the <see cref="T:System.Net.WebPermission" />.</param>
<summary>Reconstructs a <see cref="T:System.Net.WebPermission" /> from an XML encoding.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.WebPermission.FromXml%2A> method reconstructs a <xref:System.Net.WebPermission> from an XML encoding that is defined by the <xref:System.Security.SecurityElement> class.
Use the <xref:System.Net.WebPermission.ToXml%2A> method to XML-encode the <xref:System.Net.WebPermission>, including state information.
## Examples
The following example creates a <xref:System.Security.SecurityElement?displayProperty=nameWithType>, populates its attributes, and uses <xref:System.Net.WebPermission.FromXml%2A> to transfer this information to an instance of <xref:System.Net.WebPermission>.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_FromToXml/CPP/webpermission_fromtoxml.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/FromXml/webpermission_fromtoxml.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_FromToXml/VB/webpermission_fromtoxml.vb" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="securityElement" /> parameter is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="securityElement" /> is not a permission element for this type.</exception>
<altmember cref="M:System.Net.WebPermission.ToXml" />
</Docs>
</Member>
<Member MemberName="Intersect">
<MemberSignature Language="C#" Value="public override System.Security.IPermission Intersect (System.Security.IPermission target);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Security.IPermission Intersect(class System.Security.IPermission target) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.Intersect(System.Security.IPermission)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Intersect (target As IPermission) As IPermission" />
<MemberSignature Language="F#" Value="override this.Intersect : System.Security.IPermission -> System.Security.IPermission" Usage="webPermission.Intersect target" />
<MemberSignature Language="C++ CLI" Value="public:
 override System::Security::IPermission ^ Intersect(System::Security::IPermission ^ target);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.IPermission</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="target" Type="System.Security.IPermission" />
</Parameters>
<Docs>
<param name="target">The <see cref="T:System.Net.WebPermission" /> to compare with the current instance.</param>
<summary>Returns the logical intersection of two <see cref="T:System.Net.WebPermission" /> instances.</summary>
<returns>A new <see cref="T:System.Net.WebPermission" /> that represents the intersection of the current instance and the <paramref name="target" /> parameter. If the intersection is empty, the method returns <see langword="null" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Net.WebPermission.Intersect%2A> returns a <xref:System.Net.WebPermission> that contains those permissions that are common in both `target` and the current instance.
This method overrides <xref:System.Security.CodeAccessPermission.Intersect%2A> and is implemented to support the <xref:System.Security.IPermission> interface.
## Examples
The following example shows how to create an instance of <xref:System.Net.WebPermission> using the logical intersection of two existing <xref:System.Net.WebPermission> instances.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_Intersect/CPP/webpermission_intersect.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/AddPermission/webpermission_intersect.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_Intersect/VB/webpermission_intersect.vb" id="Snippet3":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="target" /> is not <see langword="null" /> or of type <see cref="T:System.Net.WebPermission" /></exception>
</Docs>
</Member>
<Member MemberName="IsSubsetOf">
<MemberSignature Language="C#" Value="public override bool IsSubsetOf (System.Security.IPermission target);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool IsSubsetOf(class System.Security.IPermission target) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.IsSubsetOf(System.Security.IPermission)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function IsSubsetOf (target As IPermission) As Boolean" />
<MemberSignature Language="F#" Value="override this.IsSubsetOf : System.Security.IPermission -> bool" Usage="webPermission.IsSubsetOf target" />
<MemberSignature Language="C++ CLI" Value="public:
 override bool IsSubsetOf(System::Security::IPermission ^ target);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="target" Type="System.Security.IPermission" />
</Parameters>
<Docs>
<param name="target">The <see cref="T:System.Net.WebPermission" /> to compare to the current <see cref="T:System.Net.WebPermission" />.</param>
<summary>Determines whether the current <see cref="T:System.Net.WebPermission" /> is a subset of the specified object.</summary>
<returns>
<see langword="true" /> if the current instance is a subset of the <paramref name="target" /> parameter; otherwise, <see langword="false" />. If the target is <see langword="null" />, the method returns <see langword="true" /> for an empty current permission that is not unrestricted and <see langword="false" /> otherwise.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the current <xref:System.Net.WebPermission> specifies a set of associated resources that is wholly contained by the `target` parameter, then the current <xref:System.Net.WebPermission> is a subset of `target`. This method overrides <xref:System.Net.WebPermission.IsSubsetOf%2A> and is implemented to support the <xref:System.Security.IPermission> interface.
## Examples
The following example uses <xref:System.Net.WebPermission.IsSubsetOf%2A> to determine whether the access rights found in one instance of <xref:System.Net.WebPermission> are found in another instance of <xref:System.Net.WebPermission>.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_IsSubset2/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/IsSubsetOf/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_IsSubset2/VB/source.vb" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The target parameter is not an instance of <see cref="T:System.Net.WebPermission" />.</exception>
<exception cref="T:System.NotSupportedException">The current instance contains a Regex-encoded right and there is not exactly the same right found in the target instance.</exception>
</Docs>
</Member>
<Member MemberName="IsUnrestricted">
<MemberSignature Language="C#" Value="public bool IsUnrestricted ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool IsUnrestricted() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.IsUnrestricted" />
<MemberSignature Language="VB.NET" Value="Public Function IsUnrestricted () As Boolean" />
<MemberSignature Language="F#" Value="abstract member IsUnrestricted : unit -> bool
override this.IsUnrestricted : unit -> bool" Usage="webPermission.IsUnrestricted " />
<MemberSignature Language="C++ CLI" Value="public:
 virtual bool IsUnrestricted();" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Security.Permissions.IUnrestrictedPermission.IsUnrestricted</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Checks the overall permission state of the <see cref="T:System.Net.WebPermission" />.</summary>
<returns>
<see langword="true" /> if the <see cref="T:System.Net.WebPermission" /> was created with the <see cref="F:System.Security.Permissions.PermissionState.Unrestricted" /><see cref="T:System.Security.Permissions.PermissionState" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If <xref:System.Net.WebPermission> is <xref:System.Security.Permissions.PermissionState.Unrestricted>, then the target class can use all URIs. Otherwise, specific permission must be given for any URI you want to use with the target class.
> [!NOTE]
> Use <xref:System.Net.WebPermission.AddPermission%2A> to add a URI and specify its permissions.
]]></format>
</remarks>
<altmember cref="M:System.Net.WebPermission.AddPermission(System.Net.NetworkAccess,System.String)" />
</Docs>
</Member>
<Member MemberName="ToXml">
<MemberSignature Language="C#" Value="public override System.Security.SecurityElement ToXml ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Security.SecurityElement ToXml() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.ToXml" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToXml () As SecurityElement" />
<MemberSignature Language="F#" Value="override this.ToXml : unit -> System.Security.SecurityElement" Usage="webPermission.ToXml " />
<MemberSignature Language="C++ CLI" Value="public:
 override System::Security::SecurityElement ^ ToXml();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.SecurityElement</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates an XML encoding of a <see cref="T:System.Net.WebPermission" /> and its current state.</summary>
<returns>A <see cref="T:System.Security.SecurityElement" /> that contains an XML-encoded representation of the <see cref="T:System.Net.WebPermission" />, including state information.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Net.WebPermission.FromXml%2A> method to restore the state information from a <xref:System.Security.SecurityElement>.
## Examples
The following example demonstrates how to use <xref:System.Net.WebPermission.ToXml%2A> to create a <xref:System.Security.SecurityElement?displayProperty=nameWithType> and print its attributes to the console.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_FromToXml/CPP/webpermission_fromtoxml.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/FromXml/webpermission_fromtoxml.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_FromToXml/VB/webpermission_fromtoxml.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="M:System.Net.WebPermission.FromXml(System.Security.SecurityElement)" />
</Docs>
</Member>
<Member MemberName="Union">
<MemberSignature Language="C#" Value="public override System.Security.IPermission Union (System.Security.IPermission target);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Security.IPermission Union(class System.Security.IPermission target) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebPermission.Union(System.Security.IPermission)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Union (target As IPermission) As IPermission" />
<MemberSignature Language="F#" Value="override this.Union : System.Security.IPermission -> System.Security.IPermission" Usage="webPermission.Union target" />
<MemberSignature Language="C++ CLI" Value="public:
 override System::Security::IPermission ^ Union(System::Security::IPermission ^ target);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Permissions</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.IPermission</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="target" Type="System.Security.IPermission" />
</Parameters>
<Docs>
<param name="target">The <see cref="T:System.Net.WebPermission" /> to combine with the current <see cref="T:System.Net.WebPermission" />.</param>
<summary>Returns the logical union between two instances of the <see cref="T:System.Net.WebPermission" /> class.</summary>
<returns>A <see cref="T:System.Net.WebPermission" /> that represents the union of the current instance and the <paramref name="target" /> parameter. If either <see langword="WebPermission" /> is <see cref="F:System.Security.Permissions.PermissionState.Unrestricted" />, the method returns a <see cref="T:System.Net.WebPermission" /> that is <see cref="F:System.Security.Permissions.PermissionState.Unrestricted" />. If the target is <see langword="null" />, the method returns a copy of the current <see cref="T:System.Net.WebPermission" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Net.WebPermission.Union%2A> returns a <xref:System.Net.WebPermission> that contains all the permissions in both `target` and the current instance.
## Examples
The following example takes the logical union of two <xref:System.Net.WebPermission> instances to create a third instance of <xref:System.Net.WebPermission>.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebPermission_Union/CPP/webpermission_union.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebPermission/.ctor/webpermission_union.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebPermission_Union/VB/webpermission_union.vb" id="Snippet2":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">target is not <see langword="null" /> or of type <see cref="T:System.Net.WebPermission" />.</exception>
<altmember cref="T:System.Security.Permissions.PermissionState" />
</Docs>
</Member>
</Members>
</Type>