This documentation is archived and is not being maintained.

ClientSettingsProvider Class

Enables Windows-based applications to retrieve user settings from a Web settings service.

Namespace:  System.Web.ClientServices.Providers
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

[PermissionSetAttribute(SecurityAction::LinkDemand, Name = L"FullTrust")]
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
public ref class ClientSettingsProvider : public SettingsProvider, 

You can use client application services to retrieve user settings from an existing Web settings service by configuring your application to use the ClientSettingsProvider class. For more information, see How to: Configure Client Application Services. After configuration, you can get and set user settings through an application settings class derived from ApplicationSettingsBase and configured to use the ClientSettingsProvider class. You can use Visual Studio to generate a Settings class for your project (accessed as Properties.Settings.Default in C# and My.Settings in Visual Basic). For more information about application settings, see Application Settings Overview.

You can retrieve the current ClientSettingsProvider through the ApplicationSettingsBase::Providers property using the fully-qualified ClientSettingsProvider class name as a key. You can also retrieve the provider through the SettingsLoadedEventArgs::Provider property when you handle the ApplicationSettingsBase::SettingsLoaded event.


This class contains a link demand and an inheritance demand at the class level that applies to all members. A SecurityException is thrown when the immediate caller or the derived class does not have full-trust permission. For details about security demands, see Link Demands and Inheritance Demands.

The following example code demonstrates how to use this event to display a list of settings that were not successfully saved.

No code example is currently available or this language may not be supported.


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