CookieHandler.DeleteCore Method (String, String, String, HttpContext)

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

When overridden in a derived class, deletes the cookie associated with the specified request that has the specified name, domain, and path.

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

protected abstract void DeleteCore(
	string name,
	string path,
	string domain,
	HttpContext context


Type: System.String

The name of the cookie

Type: System.String

The path for the cookie

Type: System.String

The domain for the cookie

Type: System.Web.HttpContext

The HttpContext for the request.

Called from the overloaded Delete methods to do the actual work of deleting the cookie. The Delete methods will ensure that name and path are non-empty strings.

Notes to Inheritors:

You must override this method. The implementation is entirely up to the developer. In the typical case, implementations replace the specified cookie in the HttpResponse.Cookies collection, with a cookie that has null data and an expiration time that is set earlier than the current time; however, this is not a requirement.

.NET Framework
Available since 4.5
Return to top