This documentation is archived and is not being maintained.

ProfileService Class

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

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

[AspNetCompatibilityRequirementsAttribute(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
[ServiceBehaviorAttribute(Namespace = "", 
	InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)]
[ServiceKnownTypeAttribute("GetKnownTypes", typeof(KnownTypesProvider))]
[ServiceContractAttribute(Namespace = "")]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class ProfileService

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.


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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5