HasProfile Method

PassportIdentity.HasProfile Method (String)


Indicates whether a given profile attribute exists in this user's profile. This class is deprecated.

Namespace:   System.Web.Security
Assembly:  System.Web (in System.Web.dll)

public bool HasProfile(
	string strProfile


Type: System.String

The Passport profile attribute to query.

Return Value

Type: System.Boolean

true if the profile attribute strProfile exists in this user's profile; otherwise, false.

This class has been deprecated and is no longer supported. Microsoft Passport Network has been replaced by Windows Live ID. For more information about how to use Windows Live ID to authenticate users in a Web application, see Windows Live ID SDK.

This example demonstrates implementing the soft sign-in authentication approach. 
In order for the example to work, the following requirements must be met. 
You can find details on these requirements in the Passport SDK documentation.

1. You must modify the Web.config file associated with this page so that 
authentication mode is set to "Passport".
2. You must have the Passport SDK installed.
3. You must have a Passport Site ID for the site where your page resides. 
If your Site ID is in the PREP environment, you will also need a PREP Passport.
4. You must have installed the encryption key you received after registering 
your site and receiving a site ID.
5. You must have the Passport Manager object settings correctly configured for 
your site.

<!-- To view this code example in a fully-working sample, see the 
PassportIdentity Class topic. -->

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft