.NET Passport Profile
.NET Passport Profile
Microsoft® .NET Passport runs and maintains its own scalable and reliable master database for storing the single sign-in (SSI) and profile information for its .NET Passport users. Although a participating .NET Passport Web site does not have direct access to a user's information in the database, it can request the information indirectly by using the GetProfileObject method of the PassportIdentity object, or the indexer for that object instance.
A profile consists of a minimal set of personal profile information about signed-in users that is shared among all .NET Passport sites. It is a set of attributes, such as Nickname, PostalCode, or City, associated with every .NET Passport user that is provided to participating .NET Passport Web sites as part of the sign-in or consent process. A .NET Passport user can fill in attribute values when registering for a .NET Passport. The profile is sent from .NET Passport network servers in the form of a query string and is stored on each user's computer as an encrypted cookie.
To query an attribute of the profile, use either the GetProfileObject method of the PassportIdentity object, or the indexer for that object. The attribute name (in this example, Nickname) must match an attribute name given for the profile in the Component Configuration Document (CCD). Querying for a nonexistent attribute generates an error at run time.
The following C# examples show the use of both the GetProfileObject method and the indexer to query the Nickname attribute.
<%
PassportIdentity id = (PassportIdentity)Context.User.Identity;
//use the GetProfileObject method
Response.Write("Nickname = " + (id.GetProfileObject("Nickname")).ToString());
//or use the indexer
Response.Write("Nickname = " + id["Nickname"]);
%>
See Also
Core Profile Table | Component Configuration Document | Passport PassportIdentity Object