Export (0) Print
Expand All

ProfileService.SetPropertiesForCurrentUser Method

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

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

[OperationContractAttribute]
public Collection<string> SetPropertiesForCurrentUser(
	IDictionary<string, Object> values,
	bool authenticatedUserOnly
)

Parameters

values
Type: System.Collections.Generic.IDictionary<String, Object>

A collection that contains names and values of the profile properties to set.

authenticatedUserOnly
Type: System.Boolean

A value that indicates whether properties are set only for users who have been authenticated.

Return Value

Type: System.Collections.ObjectModel.Collection<String>
The properties that were not set for the user profile, if any.

You use the SetPropertiesForCurrentUser method to set a user's profile properties from an application that is compatible with the Windows Communication Foundation (WCF). The SetPropertiesForCurrentUser method returns any values that are not set, which might be for any one of the following reasons:

  • The specified profile property is read only (the WriteAccessProperties property for a specified profile property is not set to true).

  • The user profile does not have a profile property that has the matching name.

  • Validation of the value failed.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft