This documentation is archived and is not being maintained.

HttpRequest.BinaryRead Method

Performs a binary read of a specified number of bytes from the current input stream.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public byte[] BinaryRead (
	int count
public byte[] BinaryRead (
	int count
public function BinaryRead (
	count : int
) : byte[]
Not applicable.



The number of bytes to read.

Return Value

A byte array.

Exception typeCondition


count is 0.

- or -

count is greater than the number of bytes available.

The BinaryRead method is provided for compatibility with ASP. For more information, see Migrating ASP Pages to ASP.NET.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0