Code to Set a New MSCSProfile Ticket

This example shows the creation of a globally unique identifier (GUID), used to identify a user, and the creation of an MSCSProfile ticket, which places the GUID on a persistent cookie for the user.

  1. Create the GenID object.

    Dim oGenID
    Set oGenID = Server.CreateObject("Commerce.GenID")
    
  2. Create the GUID string.

    Dim sGUID
    sGUID = oGenID.GenGUIDString()
    
  3. Using the AuthManager object, oAuthManager, created and initialized in Code to Create and Initialize AuthManager, create the MSCSProfile ticket.

    oAuthManager.SetProfileTicket sGUID, True
    
  4. Release the objects.

    Set oGenID = Nothing
    Set oAuthManager = Nothing
    

Copyright © 2005 Microsoft Corporation.
All rights reserved.