ProfileService::GetPropertiesForCurrentUser Method (IEnumerable<String^>^, Boolean)
Retrieves the specified profile properties and values for the current user.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
public: [OperationContractAttribute] 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.
| Exception | Condition |
|---|---|
| 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.
Available since 3.5