CookieHandler.Read Method (String, HttpContext)

.NET Framework 4.6 and 4.5

Reads the cookie associated with the specified request that has the specified name and the default domain and path.

Namespace:  System.IdentityModel.Services
Assembly:  System.IdentityModel.Services (in System.IdentityModel.Services.dll)

public byte[] Read(
	string name,
	HttpContext context
)

Parameters

name
Type: System.String

The name of the cookie to read.

context
Type: System.Web.HttpContext

The HttpContext for the request.

Return Value

Type: System.Byte[]
The cookie value or null if the cookie was not found.

ExceptionCondition
ArgumentException

name is null or empty.

.NET Framework

Supported in: 4.6, 4.5
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft