Edit

Share via


ProfileService Class

Definition

Enables access to ASP.NET user profiles through a Web service.

public ref class ProfileService
[System.ServiceModel.Activation.AspNetCompatibilityRequirements(RequirementsMode=System.ServiceModel.Activation.AspNetCompatibilityRequirementsMode.Required)]
[System.ServiceModel.ServiceBehavior(ConcurrencyMode=System.ServiceModel.ConcurrencyMode.Multiple, InstanceContextMode=System.ServiceModel.InstanceContextMode.Single, Namespace="http://asp.net/ApplicationServices/v200")]
[System.ServiceModel.ServiceContract(Namespace="http://asp.net/ApplicationServices/v200")]
[System.ServiceModel.ServiceKnownType("GetKnownTypes", typeof(System.Web.ApplicationServices.KnownTypesProvider))]
public class ProfileService
[<System.ServiceModel.Activation.AspNetCompatibilityRequirements(RequirementsMode=System.ServiceModel.Activation.AspNetCompatibilityRequirementsMode.Required)>]
[<System.ServiceModel.ServiceBehavior(ConcurrencyMode=System.ServiceModel.ConcurrencyMode.Multiple, InstanceContextMode=System.ServiceModel.InstanceContextMode.Single, Namespace="http://asp.net/ApplicationServices/v200")>]
[<System.ServiceModel.ServiceContract(Namespace="http://asp.net/ApplicationServices/v200")>]
[<System.ServiceModel.ServiceKnownType("GetKnownTypes", typeof(System.Web.ApplicationServices.KnownTypesProvider))>]
type ProfileService = class
Public Class ProfileService
Inheritance
ProfileService
Attributes

Remarks

The ProfileService class enables you to get and set a user's profile properties through a Windows Communication Foundation (WCF) service. You can keep custom information for users through profile properties. For information about profile properties, see ASP.NET Profile Properties Overview.

The ProfileService class contains the following methods that should be accessed only through a WCF service:

To call these methods, you must enable the profile service on the Web server and then connect a WCF-compatible client application to the Web service. For information about how to configure the profile service, see How to: Enable the WCF Profile Service.

The ValidatingProperties event is raised when a user's profile properties are set. You can create an event handler for the ValidatingProperties event to validate property values or to dynamically change their values.

For an example of how to use the WCF profile service from a console application, see Walkthrough: Using ASP.NET Application Services.

Constructors

ProfileService()

Initializes a new instance of the ProfileService class.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetAllPropertiesForCurrentUser(Boolean)

Retrieves all the profile properties and values that are available to the profile service for the current user.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetPropertiesForCurrentUser(IEnumerable<String>, Boolean)

Retrieves the specified profile properties and values for the current user.

GetPropertiesMetadata()

Retrieves information about the profile properties that are available through the profile service.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetPropertiesForCurrentUser(IDictionary<String,Object>, Boolean)

Sets the values of the specified properties in the user profile.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Events

ValidatingProperties

Occurs when a user's profile properties are set.

Applies to