AnonymousIdentificationModule.ClearAnonymousIdentifier Method ()
Clears the anonymous cookie or identifier associated with a session.
Assembly: System.Web (in System.Web.dll)
Callingwhen the anonymous identification is not enabled.
The user for the current request is anonymous.
The MigrateAnonymous event occurs.method removes the anonymous identifier associated with a session on a Web site. Use the method to remove the anonymous identifier associated with a session when the user switches to an authenticated session associated with a user ID, for example when the
Since a new anonymous identifier will be issued immediately if the current anonymous identifier is removed, the NotSupportedException if it is called while the session is identified by an anonymous identifier.method will throw a
If the site is using cookies, themethod issues a clear cookie to remove the anonymous identifier from the browser. The clear cookie is issued even if an anonymous cookie was not sent on the previous request.
The clear cookie is constructed as follows:
If the browser supports empty strings in a cookie, the cookie is issued with the empty string as its value; otherwise, the cookie is issued with "NoCookie" as its value.
The values for the cookie name, path, and domain are set to the defaults configured in the Web application's configuration file.
The expiration date is set to October 12, 1999.
If the site is using cookieless authentication, and an anonymous identifier is present in the URL, the anonymous identifier is removed from the URL. No other changes are made to the address or query string. After the URL is modified, a redirect is issued to return to the currently executing page.
Available since 2.0