AuthenticationService::CreatingCookie Event
Occurs when the authentication cookie is being set.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
The following example shows how to bind an event handler to the CreatingCookie event in the Application_Start method of the Global.asax file.
The following example shows an event handler for the CreatingCookie event in the Global.asax file. The event handler customizes the authentication cookie by adding the value in the CustomCredential property to the UserData property. Store the CustomCredential property in a cookie only if you know that the data in the property is not sensitive. Malicious users can access the values in the cookie.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.