-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathHttpRequest.xml
More file actions
2419 lines (2121 loc) · 150 KB
/
HttpRequest.xml
File metadata and controls
2419 lines (2121 loc) · 150 KB
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
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Type Name="HttpRequest" FullName="System.Web.HttpRequest">
<TypeSignature Language="C#" Value="public sealed class HttpRequest" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit HttpRequest extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Web.HttpRequest" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class HttpRequest" />
<TypeSignature Language="F#" Value="type HttpRequest = class" />
<TypeSignature Language="C++ CLI" Value="public ref class HttpRequest sealed" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Enables ASP.NET to read the HTTP values sent by a client during a Web request.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The methods and properties of the <xref:System.Web.HttpRequest> class are exposed through the `Request` properties of the <xref:System.Web.HttpApplication>, <xref:System.Web.HttpContext>, <xref:System.Web.UI.Page>, and <xref:System.Web.UI.UserControl> classes.
To access data from the <xref:System.Web.HttpRequest.QueryString*>, <xref:System.Web.HttpRequest.Form*>, <xref:System.Web.HttpRequest.Cookies*>, or <xref:System.Web.HttpRequest.ServerVariables*> collections, you can write `Request["key"]`, as shown in the example for the <xref:System.Web.HttpRequest.QueryString> property.
> [!NOTE]
> Unicode support for <xref:System.Web.HttpRequest> class members requires IIS version 6.0 or later.
## Examples
The following examples access the <xref:System.Web.HttpRequest> instance for the current request by using the <xref:System.Web.UI.Page.Request> property of the <xref:System.Web.UI.Page> class.
You can use simplified syntax for accessing data from the <xref:System.Web.HttpRequest.QueryString*>, <xref:System.Web.HttpRequest.Form*>, <xref:System.Web.HttpRequest.Cookies*>, or <xref:System.Web.HttpRequest.ServerVariables*> collections. You can write `Request["key"]`.
The first example shows how to retrieve a query string value when loading a page.
```csharp
public partial class AddToCart : Page
{
protected void Page_Load(object sender, EventArgs e)
{
string rawId = Request["ProductID"];
int productId;
if (!String.IsNullOrEmpty(rawId) && int.TryParse(rawId, out productId))
{
using (ShoppingCartActions usersShoppingCart = new ShoppingCartActions())
{
usersShoppingCart.AddToCart(productId);
}
}
else
{
throw new Exception("Tried to call AddToCart.aspx without setting a ProductId.");
}
Response.Redirect("ShoppingCart.aspx");
}
}
```
```vb
Public Class AddToCart
Inherits Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim rawId = Request("ProductID")
Dim productId As Integer
If Not String.IsNullOrEmpty(rawId) And Integer.TryParse(rawId, productId) Then
Using usersShoppingCart As New ShoppingCartActions()
usersShoppingCart.AddToCart(productId)
End Using
Else
Throw New Exception("Tried to call AddToCart.aspx without setting a ProductId.")
End If
Response.Redirect("ShoppingCart.aspx")
End Sub
End Class
```
The next example shows how to check if the request is authenticated and retrieve the raw URL.
```csharp
public partial class RestrictedPage : Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Request.IsAuthenticated)
{
var rawUrl = Request.RawUrl;
Response.Redirect("/Account/Login?ru=" + Server.HtmlEncode(rawUrl));
}
}
}
```
```vb
Public Class RestrictedPage
Inherits Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not Request.IsAuthenticated Then
Dim rawUrl = Request.RawUrl
Response.Redirect("/Account/Login?ru=" + Server.HtmlEncode(rawUrl))
End If
End Sub
End Class
```
This example uses the <xref:System.IO.StreamWriter> class to write the values of several <xref:System.Web.HttpRequest> class properties to a file. For properties that are of type string, the values are HTML encoded as they are written to the file. Properties that represent a collection are looped through, and each key/value pair that they contain is written to the file.
> [!IMPORTANT]
> This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)).
[!code-aspx-csharp[System.Web.HttpRequest_Sample1#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#1)]
[!code-aspx-vb[System.Web.HttpRequest_Sample1#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#1)]
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HttpRequest (string filename, string url, string queryString);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string filename, string url, string queryString) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpRequest.#ctor(System.String,System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (filename As String, url As String, queryString As String)" />
<MemberSignature Language="F#" Value="new System.Web.HttpRequest : string * string * string -> System.Web.HttpRequest" Usage="new System.Web.HttpRequest (filename, url, queryString)" />
<MemberSignature Language="C++ CLI" Value="public:
 HttpRequest(System::String ^ filename, System::String ^ url, System::String ^ queryString);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="filename" Type="System.String" />
<Parameter Name="url" Type="System.String" />
<Parameter Name="queryString" Type="System.String" />
</Parameters>
<Docs>
<param name="filename">The name of the file associated with the request.</param>
<param name="url">The information regarding the URL of the current request.</param>
<param name="queryString">The entire query string sent with the request (everything after the <c>'?'</c>).</param>
<summary>Initializes an <see cref="T:System.Web.HttpRequest" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You do not need to create your own instance of the <xref:System.Web.HttpRequest> class. The methods and properties of the <xref:System.Web.HttpRequest> class are exposed through the `Request` property of the <xref:System.Web.HttpApplication>, <xref:System.Web.HttpContext>, <xref:System.Web.UI.Page>, and <xref:System.Web.UI.UserControl> classes.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Abort">
<MemberSignature Language="C#" Value="public void Abort ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Abort() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpRequest.Abort" />
<MemberSignature Language="VB.NET" Value="Public Sub Abort ()" />
<MemberSignature Language="F#" Value="member this.Abort : unit -> unit" Usage="httpRequest.Abort " />
<MemberSignature Language="C++ CLI" Value="public:
 void Abort();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Forcibly terminates the underlying TCP connection, causing any outstanding I/O to fail. You might use this method in response to an attack by a malicious HTTP client.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is thread-safe. Any thread may call it at any time.
This method can only be used in integrated mode. If you invoke it in classic mode, an exception is thrown. To determine the pipeline mode, use <xref:System.Web.HttpRuntime.UsingIntegratedPipeline*>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AcceptTypes">
<MemberSignature Language="C#" Value="public string[] AcceptTypes { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string[] AcceptTypes" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.AcceptTypes" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AcceptTypes As String()" />
<MemberSignature Language="F#" Value="member this.AcceptTypes : string[]" Usage="System.Web.HttpRequest.AcceptTypes" />
<MemberSignature Language="C++ CLI" Value="public:
 property cli::array <System::String ^> ^ AcceptTypes { cli::array <System::String ^> ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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>
<summary>Gets a string array of client-supported MIME accept types.</summary>
<value>A string array of client-supported MIME accept types.</value>
<remarks>
<format type="text/markdown"><]
[!code-vb[Classic HttpRequest.AcceptTypes Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.AcceptTypes Example/VB/source.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AnonymousID">
<MemberSignature Language="C#" Value="public string AnonymousID { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string AnonymousID" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.AnonymousID" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AnonymousID As String" />
<MemberSignature Language="F#" Value="member this.AnonymousID : string" Usage="System.Web.HttpRequest.AnonymousID" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ AnonymousID { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the anonymous identifier for the user, if present.</summary>
<value>A string representing the current anonymous user identifier.</value>
<remarks>
<format type="text/markdown"><).
## Examples
The following example shows how to use the <xref:System.Web.HttpRequest.AnonymousID> property by handling the <xref:System.Web.Security.AnonymousIdentificationModule.Creating> event in the Global.asax file. This example has two parts:
- A method in the Global.asax file that handles the <xref:System.Web.Security.AnonymousIdentificationModule.Creating> event.
- A Web Forms page.
The first part of the code example shows how to set the <xref:System.Web.HttpRequest.AnonymousID> property by handling the <xref:System.Web.Security.AnonymousIdentificationModule.Creating> event in the Global.asax file. The method that is named `AnonymousIdentification_Creating` sets the <xref:System.Web.HttpRequest.AnonymousID> property when an anonymous ID is created.
[!code-csharp[System.Web.HttpRequest_AnonymousID#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_AnonymousID/CS/global_asax.cs#2)]
[!code-vb[System.Web.HttpRequest_AnonymousID#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_AnonymousID/vb/global_asax.vb#2)]
The second part of the code example shows how to display the new <xref:System.Web.HttpRequest.AnonymousID*> that is created by the `AnonymousIdentification_Creating` event handler in the preceding example.
[!code-aspx-csharp[System.Web.HttpRequest_AnonymousID#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_AnonymousID/CS/anonid_cs.aspx#1)]
[!code-aspx-vb[System.Web.HttpRequest_AnonymousID#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_AnonymousID/vb/anonid_vb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.HttpRequest.IsAuthenticated" />
<altmember cref="E:System.Web.Security.AnonymousIdentificationModule.Creating" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/91ka2e6a(v=vs.100)">anonymousIdentification Element (ASP.NET Settings Schema)</related>
</Docs>
</Member>
<Member MemberName="ApplicationPath">
<MemberSignature Language="C#" Value="public string ApplicationPath { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ApplicationPath" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.ApplicationPath" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ApplicationPath As String" />
<MemberSignature Language="F#" Value="member this.ApplicationPath : string" Usage="System.Web.HttpRequest.ApplicationPath" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ ApplicationPath { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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>
<summary>Gets the ASP.NET application's virtual application root path on the server.</summary>
<value>The virtual path of the current application.</value>
<remarks>
<format type="text/markdown"><]
[!code-vb[System.Web.HttpRequest_Sample1#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#2)]
The following example uses the <xref:System.Web.HttpRequest.ApplicationPath> property to programmatically construct a path to a resource that is in a fixed location in the application. The page that references the resource does not have to be located in the same directory as the resource.
[!code-aspx-csharp[System.Web.HttpRequest.ApplicationPath#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest.ApplicationPath/CS/ApplicationPath.aspx#2)]
[!code-aspx-vb[System.Web.HttpRequest.ApplicationPath#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest.ApplicationPath/VB/ApplicationPath.aspx#2)]
If you run this example in a Web application that is named WebSite1, `/WebSite1` will be displayed as the value of the <xref:System.Web.HttpRequest.ApplicationPath> property and `/WebSite1/images/Image1.gif` will be displayed as the complete path of the image.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AppRelativeCurrentExecutionFilePath">
<MemberSignature Language="C#" Value="public string AppRelativeCurrentExecutionFilePath { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string AppRelativeCurrentExecutionFilePath" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.AppRelativeCurrentExecutionFilePath" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AppRelativeCurrentExecutionFilePath As String" />
<MemberSignature Language="F#" Value="member this.AppRelativeCurrentExecutionFilePath : string" Usage="System.Web.HttpRequest.AppRelativeCurrentExecutionFilePath" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ AppRelativeCurrentExecutionFilePath { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the virtual path of the application root and makes it relative by using the tilde (\~) notation for the application root (as in "\~/page.aspx").</summary>
<value>The virtual path of the application root for the current request.</value>
<remarks>
<format type="text/markdown"><]
[!code-aspx-vb[System.Web.HttpRequest.AppRelativeCurrentExecutionPath#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest.AppRelativeCurrentExecutionPath/VB/AppRelativeCurrentExecutionPathVB.aspx#1)]
The following example uses the <xref:System.Web.HttpRequest.AppRelativeCurrentExecutionFilePath> property to programmatically set the path to a resource, based on the current path of the page.
[!code-aspx-csharp[System.Web.HttpRequest.ApplicationPath#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest.ApplicationPath/CS/apprelativecurrentexecutionfilepath.aspx#1)]
[!code-aspx-vb[System.Web.HttpRequest.ApplicationPath#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest.ApplicationPath/VB/apprelativecurrentexecutionfilepath.aspx#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BinaryRead">
<MemberSignature Language="C#" Value="public byte[] BinaryRead (int count);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance unsigned int8[] BinaryRead(int32 count) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpRequest.BinaryRead(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function BinaryRead (count As Integer) As Byte()" />
<MemberSignature Language="F#" Value="member this.BinaryRead : int -> byte[]" Usage="httpRequest.BinaryRead count" />
<MemberSignature Language="C++ CLI" Value="public:
 cli::array <System::Byte> ^ BinaryRead(int count);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="count" Type="System.Int32" />
</Parameters>
<Docs>
<param name="count">The number of bytes to read.</param>
<summary>Performs a binary read of a specified number of bytes from the current input stream.</summary>
<returns>A byte array.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.HttpRequest.BinaryRead*> method is provided for compatibility with ASP.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="count" /> is 0.
-or-
<paramref name="count" /> is greater than the number of bytes available.</exception>
</Docs>
</Member>
<Member MemberName="Browser">
<MemberSignature Language="C#" Value="public System.Web.HttpBrowserCapabilities Browser { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.HttpBrowserCapabilities Browser" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.Browser" />
<MemberSignature Language="VB.NET" Value="Public Property Browser As HttpBrowserCapabilities" />
<MemberSignature Language="F#" Value="member this.Browser : System.Web.HttpBrowserCapabilities with get, set" Usage="System.Web.HttpRequest.Browser" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Web::HttpBrowserCapabilities ^ Browser { System::Web::HttpBrowserCapabilities ^ get(); void set(System::Web::HttpBrowserCapabilities ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.HttpBrowserCapabilities</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets information about the requesting client's browser capabilities.</summary>
<value>An <see cref="T:System.Web.HttpBrowserCapabilities" /> object listing the capabilities of the client's browser.</value>
<remarks>
<format type="text/markdown"><]
[!code-vb[Classic HttpRequest.Browser Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Browser Example/VB/source.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Page.ClientTarget" />
<altmember cref="T:System.Web.HttpBrowserCapabilities" />
<altmember cref="P:System.Web.HttpRequest.UserAgent" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/x3k2ssx2(v=vs.100)">ASP.NET Server Controls and Browser Capabilities</related>
</Docs>
</Member>
<Member MemberName="ClientCertificate">
<MemberSignature Language="C#" Value="public System.Web.HttpClientCertificate ClientCertificate { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.HttpClientCertificate ClientCertificate" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.ClientCertificate" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ClientCertificate As HttpClientCertificate" />
<MemberSignature Language="F#" Value="member this.ClientCertificate : System.Web.HttpClientCertificate" Usage="System.Web.HttpRequest.ClientCertificate" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Web::HttpClientCertificate ^ ClientCertificate { System::Web::HttpClientCertificate ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.HttpClientCertificate</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the current request's client security certificate.</summary>
<value>An <see cref="T:System.Web.HttpClientCertificate" /> object containing information about the client's security certificate settings.</value>
<remarks>
<format type="text/markdown"><]
[!code-vb[Classic HttpRequest.ClientCertificate Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ClientCertificate Example/VB/source.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ContentEncoding">
<MemberSignature Language="C#" Value="public System.Text.Encoding ContentEncoding { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Text.Encoding ContentEncoding" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.ContentEncoding" />
<MemberSignature Language="VB.NET" Value="Public Property ContentEncoding As Encoding" />
<MemberSignature Language="F#" Value="member this.ContentEncoding : System.Text.Encoding with get, set" Usage="System.Web.HttpRequest.ContentEncoding" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Text::Encoding ^ ContentEncoding { System::Text::Encoding ^ get(); void set(System::Text::Encoding ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Text.Encoding</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the character set of the entity-body.</summary>
<value>An <see cref="T:System.Text.Encoding" /> object representing the client's character set.</value>
<remarks>
<format type="text/markdown"><) of a configuration file. If content encoding is also specified by the client, the default configuration settings are overridden.
## Examples
The following code example assigns a value representing the description of the current HTTP encoding to a string variable.
[!code-csharp[Classic HttpRequest.ContentEncoding Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.ContentEncoding Example/CS/source.cs#1)]
[!code-vb[Classic HttpRequest.ContentEncoding Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ContentEncoding Example/VB/source.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ContentLength">
<MemberSignature Language="C#" Value="public int ContentLength { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 ContentLength" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.ContentLength" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ContentLength As Integer" />
<MemberSignature Language="F#" Value="member this.ContentLength : int" Usage="System.Web.HttpRequest.ContentLength" />
<MemberSignature Language="C++ CLI" Value="public:
 property int ContentLength { int get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Specifies the length, in bytes, of content sent by the client.</summary>
<value>The length, in bytes, of content sent by the client.</value>
<remarks>
<format type="text/markdown"><]
[!code-vb[Classic HttpRequest.ContentLength Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ContentLength Example/VB/source.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ContentType">
<MemberSignature Language="C#" Value="public string ContentType { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ContentType" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.ContentType" />
<MemberSignature Language="VB.NET" Value="Public Property ContentType As String" />
<MemberSignature Language="F#" Value="member this.ContentType : string with get, set" Usage="System.Web.HttpRequest.ContentType" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ ContentType { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the MIME content type of the incoming request.</summary>
<value>A string representing the MIME content type of the incoming request, for example, "text/html". Additional common MIME types include "audio.wav", "image/gif", and "application/pdf".</value>
<remarks>
<format type="text/markdown"><]
[!code-vb[Classic HttpRequest.ContentType Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ContentType Example/VB/source.vb#1)]
The following example shows output that might be produced by this code.
`GET`
`127.0.0.1`
`127.0.0.1`
`GET`
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Cookies">
<MemberSignature Language="C#" Value="public System.Web.HttpCookieCollection Cookies { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.HttpCookieCollection Cookies" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.Cookies" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Cookies As HttpCookieCollection" />
<MemberSignature Language="F#" Value="member this.Cookies : System.Web.HttpCookieCollection" Usage="System.Web.HttpRequest.Cookies" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Web::HttpCookieCollection ^ Cookies { System::Web::HttpCookieCollection ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.HttpCookieCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a collection of cookies sent by the client.</summary>
<value>An <see cref="T:System.Web.HttpCookieCollection" /> object representing the client's cookie variables.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
ASP.NET includes two intrinsic cookie collections. The collection accessed through the <xref:System.Web.HttpRequest.Cookies*> collection of <xref:System.Web.HttpRequest> contains cookies transmitted by the client to the server in the `Cookie` header. The collection accessed through the <xref:System.Web.HttpResponse.Cookies*> collection of <xref:System.Web.HttpResponse> contains new cookies created on the server and transmitted to the client in the `Set-Cookie` header.
> [!NOTE]
> After you add a cookie by using the <xref:System.Web.HttpResponse.Cookies*?displayProperty=nameWithType> collection, the cookie is immediately available in the <xref:System.Web.HttpRequest.Cookies*?displayProperty=nameWithType> collection, even if the response has not been sent to the client.
## Examples
The following code example loops through all cookies sent by the client and sends the name, expiration date, security parameter, and values of each cookie to the HTTP output.
[!code-csharp[Classic HttpRequest.Cookies Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Cookies Example/CS/source.cs#1)]
[!code-vb[Classic HttpRequest.Cookies Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Cookies Example/VB/source.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpRequest.ValidateInput" />
<altmember cref="P:System.Web.HttpRequest.Form" />
<altmember cref="P:System.Web.HttpRequest.QueryString" />
</Docs>
</Member>
<Member MemberName="CurrentExecutionFilePath">
<MemberSignature Language="C#" Value="public string CurrentExecutionFilePath { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string CurrentExecutionFilePath" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.CurrentExecutionFilePath" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CurrentExecutionFilePath As String" />
<MemberSignature Language="F#" Value="member this.CurrentExecutionFilePath : string" Usage="System.Web.HttpRequest.CurrentExecutionFilePath" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ CurrentExecutionFilePath { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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>
<summary>Gets the virtual path of the current request.</summary>
<value>The virtual path of the current request.</value>
<remarks>
<format type="text/markdown"><]
[!code-vb[System.Web.HttpRequest_Sample1#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#2)]
]]></format>
</remarks>
<altmember cref="P:System.Web.HttpRequest.FilePath" />
<altmember cref="P:System.Web.HttpRequest.Path" />
<altmember cref="P:System.Web.HttpRequest.PathInfo" />
<altmember cref="M:System.Web.HttpServerUtility.Execute(System.String)" />
<altmember cref="M:System.Web.HttpServerUtility.Transfer(System.String,System.Boolean)" />
</Docs>
</Member>
<Member MemberName="CurrentExecutionFilePathExtension">
<MemberSignature Language="C#" Value="public string CurrentExecutionFilePathExtension { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string CurrentExecutionFilePathExtension" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.CurrentExecutionFilePathExtension" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CurrentExecutionFilePathExtension As String" />
<MemberSignature Language="F#" Value="member this.CurrentExecutionFilePathExtension : string" Usage="System.Web.HttpRequest.CurrentExecutionFilePathExtension" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ CurrentExecutionFilePathExtension { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the extension of the file name that is specified in the <see cref="P:System.Web.HttpRequest.CurrentExecutionFilePath" /> property.</summary>
<value>The extension of the file name that is specified in the <see cref="P:System.Web.HttpRequest.CurrentExecutionFilePath" /> property.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="FilePath">
<MemberSignature Language="C#" Value="public string FilePath { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string FilePath" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.FilePath" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property FilePath As String" />
<MemberSignature Language="F#" Value="member this.FilePath : string" Usage="System.Web.HttpRequest.FilePath" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ FilePath { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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>
<summary>Gets the virtual path of the current request.</summary>
<value>The virtual path of the current request.</value>
<remarks>
<format type="text/markdown"><]
[!code-vb[System.Web.HttpRequest_Sample1#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#2)]
]]></format>
</remarks>
<altmember cref="P:System.Web.HttpRequest.PathInfo" />
<altmember cref="P:System.Web.HttpRequest.Path" />
</Docs>
</Member>
<Member MemberName="Files">
<MemberSignature Language="C#" Value="public System.Web.HttpFileCollection Files { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.HttpFileCollection Files" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.Files" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Files As HttpFileCollection" />
<MemberSignature Language="F#" Value="member this.Files : System.Web.HttpFileCollection" Usage="System.Web.HttpRequest.Files" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Web::HttpFileCollection ^ Files { System::Web::HttpFileCollection ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.HttpFileCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the collection of files uploaded by the client, in multipart MIME format.</summary>
<value>An <see cref="T:System.Web.HttpFileCollection" /> object representing a collection of files uploaded by the client. The items of the <see cref="T:System.Web.HttpFileCollection" /> object are of type <see cref="T:System.Web.HttpPostedFile" />.</value>
<remarks>
<format type="text/markdown"><]
[!code-vb[Classic HttpRequest.Files Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Files Example/VB/source.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Filter">
<MemberSignature Language="C#" Value="public System.IO.Stream Filter { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.IO.Stream Filter" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.Filter" />
<MemberSignature Language="VB.NET" Value="Public Property Filter As Stream" />
<MemberSignature Language="F#" Value="member this.Filter : System.IO.Stream with get, set" Usage="System.Web.HttpRequest.Filter" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::IO::Stream ^ Filter { System::IO::Stream ^ get(); void set(System::IO::Stream ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IO.Stream</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the filter to use when reading the current input stream.</summary>
<value>A <see cref="T:System.IO.Stream" /> object to be used as the filter.</value>
<remarks>
<format type="text/markdown"><]
[!code-aspx-vb[System.Web.HttpRequest.Filter#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest.Filter/VB/systemwebhttprequestfilter.vb.aspx#1)]
]]></format>
</remarks>
<exception cref="T:System.Web.HttpException">The specified <see cref="T:System.IO.Stream" /> is invalid.</exception>
</Docs>
</Member>
<Member MemberName="Form">
<MemberSignature Language="C#" Value="public System.Collections.Specialized.NameValueCollection Form { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Specialized.NameValueCollection Form" />
<MemberSignature Language="DocId" Value="P:System.Web.HttpRequest.Form" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Form As NameValueCollection" />
<MemberSignature Language="F#" Value="member this.Form : System.Collections.Specialized.NameValueCollection" Usage="System.Web.HttpRequest.Form" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Collections::Specialized::NameValueCollection ^ Form { System::Collections::Specialized::NameValueCollection ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Specialized.NameValueCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a collection of form variables.</summary>
<value>A <see cref="T:System.Collections.Specialized.NameValueCollection" /> representing a collection of form variables.</value>
<remarks>
<format type="text/markdown"><]
[!code-vb[Classic HttpRequest.Form Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Form Example/VB/source.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpRequest.ValidateInput" />
<altmember cref="P:System.Web.HttpRequest.Cookies" />
<altmember cref="P:System.Web.HttpRequest.QueryString" />
</Docs>
</Member>
<Member MemberName="GetBufferedInputStream">
<MemberSignature Language="C#" Value="public System.IO.Stream GetBufferedInputStream ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.IO.Stream GetBufferedInputStream() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpRequest.GetBufferedInputStream" />
<MemberSignature Language="VB.NET" Value="Public Function GetBufferedInputStream () As Stream" />
<MemberSignature Language="F#" Value="member this.GetBufferedInputStream : unit -> System.IO.Stream" Usage="httpRequest.GetBufferedInputStream " />
<MemberSignature Language="C++ CLI" Value="public:
 System::IO::Stream ^ GetBufferedInputStream();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IO.Stream</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets a <see cref="T:System.IO.Stream" /> object that can be used to read the incoming HTTP entity body.</summary>
<returns>A <see cref="T:System.IO.Stream" /> object that can be used to read the incoming HTTP entity body.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is identical to <xref:System.Web.HttpRequest.GetBufferlessInputStream*> except that it also copies the bytes that are read to the internal storage that is used by ASP.NET to populate the <xref:System.Web.HttpRequest.Form*>, <xref:System.Web.HttpRequest.Files*>, and <xref:System.Web.HttpRequest.InputStream*> properties. Because this information is preserved, downstream code such as ASP.NET Web Forms pages (.aspx files) will run successfully. This is not the case with the <xref:System.Web.HttpRequest.GetBufferlessInputStream*> method.
]]></format>
</remarks>
<exception cref="T:System.Web.HttpException">The request's entity body has already been loaded and parsed. Examples of properties that cause the entity body to be loaded and parsed include the following:
- The <see cref="P:System.Web.HttpRequest.Form" /> property.
- The <see cref="P:System.Web.HttpRequest.Files" /> property.
- The <see cref="P:System.Web.HttpRequest.InputStream" /> property.
- The <see cref="M:System.Web.HttpRequest.GetBufferlessInputStream" /> method.
To avoid this exception, call the <see cref="P:System.Web.HttpRequest.ReadEntityBodyMode" /> method first. This exception is also thrown if the client disconnects while the entity body is being read.</exception>
</Docs>
</Member>
<MemberGroup MemberName="GetBufferlessInputStream">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Gets a <see cref="T:System.IO.Stream" /> object that can be used to read the incoming HTTP entity body.</summary>
</Docs>
</MemberGroup>
<Member MemberName="GetBufferlessInputStream">
<MemberSignature Language="C#" Value="public System.IO.Stream GetBufferlessInputStream ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.IO.Stream GetBufferlessInputStream() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpRequest.GetBufferlessInputStream" />
<MemberSignature Language="VB.NET" Value="Public Function GetBufferlessInputStream () As Stream" />
<MemberSignature Language="F#" Value="member this.GetBufferlessInputStream : unit -> System.IO.Stream" Usage="httpRequest.GetBufferlessInputStream " />
<MemberSignature Language="C++ CLI" Value="public:
 System::IO::Stream ^ GetBufferlessInputStream();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IO.Stream</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets a <see cref="T:System.IO.Stream" /> object that can be used to read the incoming HTTP entity body.</summary>
<returns>A <see cref="T:System.IO.Stream" /> object that can be used to read the incoming HTTP entity body.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method provides an alternative to using the <xref:System.Web.HttpRequest.InputStream> property. The <xref:System.Web.HttpRequest.InputStream> property waits until the whole request has been received before it returns a <xref:System.IO.Stream> object. In contrast, the <xref:System.Web.HttpRequest.GetBufferlessInputStream*> method returns the <xref:System.IO.Stream> object immediately. You can use the method to begin processing the entity body before the complete contents of the body have been received.
The entity body (or as much of it as you request and has been received) is returned only when you use the object that is returned by this method to read the stream, by calling methods such as the <xref:System.IO.Stream.Read*> method. You use parameters of the <xref:System.IO.Stream.Read*> method to specify how much of the entity body to read.
The <xref:System.IO.Stream> object returned by ASP.NET from this method supports both synchronous and asynchronous read methods. The <xref:System.IO.Stream> object implements both the <xref:System.IO.Stream.BeginRead*> and <xref:System.IO.Stream.EndRead*> methods. The asynchronous methods let you asynchronously read the request entity in chunks, while ASP.NET releases the current thread in between each iteration of an asynchronous read loop.
This method can be useful if the request is uploading a large file and you want to begin accessing the file contents before the upload is finished. However, you should only use this method for scenarios where you want to take over all processing of the entity body. This means that you cannot use this method from an .aspx page, because by the time an .aspx page runs, the entity body has already been read.
]]></format>
</remarks>
<exception cref="T:System.Web.HttpException">The request's entity body has already been loaded and parsed. Examples of properties that cause the entity body to be loaded and parsed include the following:
- <see cref="P:System.Web.HttpRequest.Form" />
- <see cref="P:System.Web.HttpRequest.InputStream" />
- <see cref="P:System.Web.HttpRequest.Files" />
- <see cref="M:System.Web.HttpRequest.GetBufferedInputStream" />
To avoid this exception, call the <see cref="P:System.Web.HttpRequest.ReadEntityBodyMode" /> method first. This exception is also thrown if the client disconnects while the entity body is being read.</exception>
<altmember cref="M:System.Web.HttpRequest.GetBufferedInputStream" />
</Docs>
</Member>
<Member MemberName="GetBufferlessInputStream">
<MemberSignature Language="C#" Value="public System.IO.Stream GetBufferlessInputStream (bool disableMaxRequestLength);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.IO.Stream GetBufferlessInputStream(bool disableMaxRequestLength) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpRequest.GetBufferlessInputStream(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Function GetBufferlessInputStream (disableMaxRequestLength As Boolean) As Stream" />
<MemberSignature Language="F#" Value="member this.GetBufferlessInputStream : bool -> System.IO.Stream" Usage="httpRequest.GetBufferlessInputStream disableMaxRequestLength" />
<MemberSignature Language="C++ CLI" Value="public:
 System::IO::Stream ^ GetBufferlessInputStream(bool disableMaxRequestLength);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IO.Stream</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disableMaxRequestLength" Type="System.Boolean" Index="0" FrameworkAlternate="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" />
</Parameters>
<Docs>
<param name="disableMaxRequestLength">
<see langword="true" /> to disable the request-length limit; otherwise, <see langword="false" />.</param>
<summary>Gets a <see cref="T:System.IO.Stream" /> object that can be used to read the incoming HTTP entity body, optionally disabling the request-length limit that is set in the <see cref="P:System.Web.Configuration.HttpRuntimeSection.MaxRequestLength" /> property.</summary>
<returns>A <see cref="T:System.IO.Stream" /> object that can be used to read the incoming HTTP entity body.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For more information about this method, see the <xref:System.Web.HttpRequest.GetBufferlessInputStream> overload.
]]></format>
</remarks>
<exception cref="T:System.Web.HttpException">The request's entity body has already been loaded and parsed. Examples of properties that cause the entity body to be loaded and parsed include the following:
- The <see cref="P:System.Web.HttpRequest.Form" /> property.
- The <see cref="P:System.Web.HttpRequest.Files" /> property.
- The <see cref="P:System.Web.HttpRequest.InputStream" /> property.
- The <see cref="M:System.Web.HttpRequest.GetBufferedInputStream" /> method.
To avoid this exception, call the <see cref="P:System.Web.HttpRequest.ReadEntityBodyMode" /> method first. This exception is also thrown if the client disconnects while the entity body is being read.</exception>
<altmember cref="M:System.Web.HttpRequest.GetBufferedInputStream" />