GetPropertiesForCurrentUser Method

ProfileService.GetPropertiesForCurrentUser Method

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

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

[OperationContractAttribute]
public Dictionary<string, Object> GetPropertiesForCurrentUser(
	IEnumerable<string> properties,
	bool authenticatedUserOnly
)

Parameters

properties
Type: System.Collections.Generic.IEnumerable<String>
A collection of string values that contains the names of the profile properties to retrieve.
authenticatedUserOnly
Type: System.Boolean
A value that indicates whether properties are returned only for users who have been authenticated.

Return Value

Type: System.Collections.Generic.Dictionary<String, Object>
The profile property information and values.

ExceptionCondition
ArgumentNullException

The properties parameter or an item in the properties collection is null.

To get specific profile property values for the current users, you use the GetPropertiesForCurrentUser method to specify which profile properties are retrieved. The GetPropertiesForCurrentUser method returns values only for profile properties that are configured for access through a Web service. You configure a profile property for access through a Web service by setting the ReadAccessProperties property or WriteAccessProperties property to true.

.NET Framework

Supported in: 4, 3.5

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

ADD
Show:
© 2016 Microsoft