ProfileService Class


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

Namespace:   System.Web.ApplicationServices
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)


[ServiceContractAttribute(Namespace = "")]
[ServiceKnownTypeAttribute("GetKnownTypes", (KnownTypesProvider^::typeid))]
[AspNetCompatibilityRequirementsAttribute(RequirementsMode = AspNetCompatibilityRequirementsMode::Required)]
[ServiceBehaviorAttribute(Namespace = "", 
	InstanceContextMode = InstanceContextMode::Single, ConcurrencyMode = ConcurrencyMode::Multiple)]
public ref class ProfileService 


Initializes a new instance of the ProfileService class.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


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


Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetPropertiesForCurrentUser(IEnumerable<String^>^, Boolean)

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


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


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodSetPropertiesForCurrentUser(IDictionary<String^, Object^>^, Boolean)

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


Returns a string that represents the current object.(Inherited from Object.)


Occurs when a user's profile properties are set.

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.

.NET Framework
Available since 3.5

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top