Uredi

Deli z drugimi prek


PersonalizationAdministration.ResetUserState Method

Definition

Resets all per-user state in the underlying data store for the specified parameters.

Overloads

ResetUserState(String)

Resets all per-user state in the underlying data store for the specified path.

ResetUserState(String[])

Resets all per-user state in the underlying data store for the specified paths.

ResetUserState(String, String)

Resets per-user state in the underlying data store for the specified combination of user name and path.

ResetUserState(String, String[])

Resets per-user state in the underlying data store for the page and users specified.

ResetUserState(String)

Resets all per-user state in the underlying data store for the specified path.

public:
 static int ResetUserState(System::String ^ path);
public static int ResetUserState (string path);
static member ResetUserState : string -> int
Public Shared Function ResetUserState (path As String) As Integer

Parameters

path
String

The path to the page associated with the personalization state information to be reset.

Returns

The number of rows that were reset.

Exceptions

path is null.

path is an empty string ("").

-or-

The provider for a personalization provider defined in configuration is not of the correct type.

-or-

The length of the string of any parameter is greater than 256 characters.

A configuration exception occurred while attempting to create and initialize an instance of one of the configured personalization providers.

-or-

The default personalization provider defined in configuration could not be found.

The default provider indicated that the number of deleted rows was a negative number.

Remarks

This method returns the count of the number of rows that were reset. It is not an error to attempt to reset nonexistent shared state.

See also

Applies to

ResetUserState(String[])

Resets all per-user state in the underlying data store for the specified paths.

public:
 static int ResetUserState(cli::array <System::String ^> ^ usernames);
public static int ResetUserState (string[] usernames);
static member ResetUserState : string[] -> int
Public Shared Function ResetUserState (usernames As String()) As Integer

Parameters

usernames
String[]

An array of user names whose per-user data should be reset.

Returns

The number of rows that were reset.

Exceptions

usernames is null.

usernames is a zero-length array.

-or-

A member of usernames is either null, contains commas, or is an empty string ("") after trimming.

-or-

The provider for a personalization provider defined in configuration is not of the correct type.

-or-

The length of the string of any parameter is greater than 256 characters.

A configuration exception occurred while attempting to create and initialize an instance of one of the configured personalization providers.

-or-

The default personalization provider defined in configuration could not be found.

The default provider indicated that the number of deleted rows was a negative number.

Remarks

This method resets all per-user state in the underlying data store associated with the users contained in the usernames parameter, and returns a count of the number of rows that were reset.

It is not an error to attempt to reset nonexistent shared state.

See also

Applies to

ResetUserState(String, String)

Resets per-user state in the underlying data store for the specified combination of user name and path.

public:
 static bool ResetUserState(System::String ^ path, System::String ^ username);
public static bool ResetUserState (string path, string username);
static member ResetUserState : string * string -> bool
Public Shared Function ResetUserState (path As String, username As String) As Boolean

Parameters

path
String

The path to the page associated with the personalization state information to be reset.

username
String

The user name associated with the personalization data to be reset.

Returns

The number of rows that were reset.

Exceptions

path or username is null.

path or username is an empty string ("") after trimming.

-or-

username contains commas.

-or-

The provider for a personalization provider defined in configuration is not of the correct type.

-or-

The length of the string of any parameter is greater than 256 characters.

A configuration exception occurred while attempting to create and initialize an instance of one of the configured personalization providers.

-or-

The default personalization provider defined in configuration could not be found.

The default provider indicated that the number of deleted rows was a negative number.

Remarks

It is not an error to attempt to reset nonexistent user state.

See also

Applies to

ResetUserState(String, String[])

Resets per-user state in the underlying data store for the page and users specified.

public:
 static int ResetUserState(System::String ^ path, cli::array <System::String ^> ^ usernames);
public static int ResetUserState (string path, string[] usernames);
static member ResetUserState : string * string[] -> int
Public Shared Function ResetUserState (path As String, usernames As String()) As Integer

Parameters

path
String

The path to the page associated with the personalization state information to be reset.

usernames
String[]

The user names associated with the personalization data to be reset.

Returns

The number of rows that were reset.

Exceptions

path or usernames is null.

path is an empty string ("") after trimming.

-or-

A member of usernames is null, an empty string after trimming, or contains commas.

-or-

usernames is a zero-length array.

-or-

The provider for a personalization provider defined in configuration is not of the correct type.

-or-

The length of the string of any parameter is greater than 256 characters.

A configuration exception occurred while attempting to create and initialize an instance of one of the configured personalization providers.

-or-

The default personalization provider defined in configuration could not be found.

The default provider indicated that the number of deleted rows was a negative number.

Remarks

This method resets per-user state in the underlying data store associated with each user contained in the usernames parameter for the page specified by path.

It is not an error to attempt to reset nonexistent user state.

See also

Applies to