[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Expand]Concepts
 [Expand]Design-Time Features
 [Expand]Deployment
 [Expand]Task-Based Help
  Frequently Asked Questions (FAQ)
 [Collapse]API Reference
  [Expand]DevExpress.EasyTest.Framework
  [Expand]DevExpress.ExpressApp
  [Expand]DevExpress.ExpressApp.Actions
  [Expand]DevExpress.ExpressApp.AuditTrail
  [Expand]DevExpress.ExpressApp.Chart
  [Expand]DevExpress.ExpressApp.Chart.Web
  [Expand]DevExpress.ExpressApp.Chart.Win
  [Expand]DevExpress.ExpressApp.CloneObject
  [Expand]DevExpress.ExpressApp.ConditionalAppearance
  [Expand]DevExpress.ExpressApp.Dashboards
  [Expand]DevExpress.ExpressApp.Dashboards.Web
  [Expand]DevExpress.ExpressApp.Dashboards.Win
  [Expand]DevExpress.ExpressApp.Data
  [Expand]DevExpress.ExpressApp.DC
  [Expand]DevExpress.ExpressApp.DC.ClassGeneration
  [Expand]DevExpress.ExpressApp.Editors
  [Expand]DevExpress.ExpressApp.EF
  [Expand]DevExpress.ExpressApp.EF.Utils
  [Expand]DevExpress.ExpressApp.FileAttachments.Web
  [Expand]DevExpress.ExpressApp.FileAttachments.Win
  [Expand]DevExpress.ExpressApp.Filtering
  [Expand]DevExpress.ExpressApp.HtmlPropertyEditor.Web
  [Expand]DevExpress.ExpressApp.HtmlPropertyEditor.Win
  [Expand]DevExpress.ExpressApp.Kpi
  [Expand]DevExpress.ExpressApp.Layout
  [Expand]DevExpress.ExpressApp.Maps.Mobile
  [Expand]DevExpress.ExpressApp.Maps.Mobile.Editors
  [Expand]DevExpress.ExpressApp.Maps.Web
  [Expand]DevExpress.ExpressApp.Maps.Web.Helpers
  [Expand]DevExpress.ExpressApp.MiddleTier
  [Expand]DevExpress.ExpressApp.Mobile
  [Expand]DevExpress.ExpressApp.Mobile.Editors
  [Expand]DevExpress.ExpressApp.Mobile.MobileModel
  [Expand]DevExpress.ExpressApp.Mobile.SystemModule
  [Expand]DevExpress.ExpressApp.Mobile.Templates
  [Expand]DevExpress.ExpressApp.Model
  [Expand]DevExpress.ExpressApp.Model.Core
  [Expand]DevExpress.ExpressApp.Model.NodeGenerators
  [Expand]DevExpress.ExpressApp.ModelEditor
  [Expand]DevExpress.ExpressApp.Notifications
  [Expand]DevExpress.ExpressApp.Notifications.Web
  [Expand]DevExpress.ExpressApp.Notifications.Win
  [Expand]DevExpress.ExpressApp.Office.Win
  [Expand]DevExpress.ExpressApp.PivotChart
  [Expand]DevExpress.ExpressApp.PivotChart.Web
  [Expand]DevExpress.ExpressApp.PivotChart.Win
  [Expand]DevExpress.ExpressApp.PivotGrid
  [Expand]DevExpress.ExpressApp.PivotGrid.Web
  [Expand]DevExpress.ExpressApp.PivotGrid.Win
  [Expand]DevExpress.ExpressApp.Reports
  [Expand]DevExpress.ExpressApp.Reports.Web
  [Expand]DevExpress.ExpressApp.Reports.Win
  [Expand]DevExpress.ExpressApp.ReportsV2
  [Expand]DevExpress.ExpressApp.ReportsV2.Mobile
  [Expand]DevExpress.ExpressApp.ReportsV2.Web
  [Expand]DevExpress.ExpressApp.ReportsV2.Win
  [Expand]DevExpress.ExpressApp.Scheduler
  [Expand]DevExpress.ExpressApp.Scheduler.Web
  [Expand]DevExpress.ExpressApp.Scheduler.Win
  [Expand]DevExpress.ExpressApp.ScriptRecorder
  [Expand]DevExpress.ExpressApp.ScriptRecorder.Web
  [Expand]DevExpress.ExpressApp.ScriptRecorder.Win
  [Expand]DevExpress.ExpressApp.Security
  [Expand]DevExpress.ExpressApp.Security.Adapters
  [Expand]DevExpress.ExpressApp.Security.ClientServer.Wcf
  [Expand]DevExpress.ExpressApp.Security.EF.Adapters
  [Expand]DevExpress.ExpressApp.Security.Strategy
  [Expand]DevExpress.ExpressApp.Security.Xpo.Adapters
  [Expand]DevExpress.ExpressApp.StateMachine
  [Expand]DevExpress.ExpressApp.SystemModule
  [Expand]DevExpress.ExpressApp.Templates
  [Expand]DevExpress.ExpressApp.Templates.ActionContainers
  [Expand]DevExpress.ExpressApp.TreeListEditors
  [Expand]DevExpress.ExpressApp.TreeListEditors.Web
  [Expand]DevExpress.ExpressApp.TreeListEditors.Win
  [Expand]DevExpress.ExpressApp.Updating
  [Collapse]DevExpress.ExpressApp.Utils
   [Expand]BoolList Class
    BoolListOperatorType Enumeration
   [Expand]BoolValueChangedEventArgs Class
   [Expand]CaptionHelper Class
    CompoundNameConvertStyle Enumeration
   [Expand]CustomizeConvertCompoundNameEventArgs Class
   [Expand]CustomizeImageInfoEventArgs Class
   [Expand]CustomizeTableNameEventArgs Class
   [Expand]DataViewExpression Class
   [Expand]EnumDescriptor Class
   [Expand]Guard Class
   [Collapse]ICustomObjectSerialize Interface
     ICustomObjectSerialize Members
    [Expand]ICustomObjectSerialize Methods
   [Expand]ImageInfo Structure
   [Expand]ImageLoader Class
   [Expand]ITranslatorProvider Interface
    ReadByNonExistentKeyMode Enumeration
   [Expand]SplitString Class
   [Expand]StatusUpdatingEventArgs Class
  [Expand]DevExpress.ExpressApp.Validation
  [Expand]DevExpress.ExpressApp.Validation.Web
  [Expand]DevExpress.ExpressApp.Validation.Win
  [Expand]DevExpress.ExpressApp.ViewVariantsModule
  [Expand]DevExpress.ExpressApp.Web
  [Expand]DevExpress.ExpressApp.Web.Controls
  [Expand]DevExpress.ExpressApp.Web.Editors
  [Expand]DevExpress.ExpressApp.Web.Editors.ASPx
  [Expand]DevExpress.ExpressApp.Web.SystemModule
  [Expand]DevExpress.ExpressApp.Web.Templates
  [Expand]DevExpress.ExpressApp.Web.Utils
  [Expand]DevExpress.ExpressApp.Win
  [Expand]DevExpress.ExpressApp.Win.Core
  [Expand]DevExpress.ExpressApp.Win.Editors
  [Expand]DevExpress.ExpressApp.Win.Model
  [Expand]DevExpress.ExpressApp.Win.SystemModule
  [Expand]DevExpress.ExpressApp.Win.Templates
  [Expand]DevExpress.ExpressApp.Win.Templates.Navigation
  [Expand]DevExpress.ExpressApp.Win.Utils
  [Expand]DevExpress.ExpressApp.Workflow
  [Expand]DevExpress.ExpressApp.Workflow.Win
  [Expand]DevExpress.ExpressApp.Xpo
  [Expand]DevExpress.ExpressApp.Xpo.Utils
  [Expand]DevExpress.Persistent.Base
  [Expand]DevExpress.Persistent.Base.General
  [Expand]DevExpress.Persistent.Base.ReportsV2
  [Expand]DevExpress.Persistent.Base.Security
  [Expand]DevExpress.Persistent.BaseImpl
  [Expand]DevExpress.Persistent.BaseImpl.EF
  [Expand]DevExpress.Persistent.BaseImpl.EF.PermissionPolicy
  [Expand]DevExpress.Persistent.BaseImpl.PermissionPolicy
  [Expand]DevExpress.Persistent.Validation
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

ICustomObjectSerialize Interface

Declares methods implemented by classes that interact with the settings storage.

Namespace:DevExpress.ExpressApp.Utils
Assembly:DevExpress.ExpressApp.v19.1.dll

Expanded Syntax

Expanded Remarks

The ICustomObjectSerialize interface exposes two methods. The ReadPropertyValues method handles loading the values from the settings storage. The WritePropertyValues method handles saving the values to the settings storage.

You can implement the ICustomObjectSerialize interface in an AuthenticationStandardLogonParameters descendant, to customize the process of loading and saving logon parameters. The code below illustrates how to provide end users with the ability to choose whether to input a password each time the Logon Window is displayed, or input a password once, and remember it in the logon parameters storage.

Note

You may need to add a reference to the DevExpress.ExpressApp.Security.19.1.dll assembly.

Take note of the ReadPropertyValues and WritePropertyValues methods implementation. In the ReadPropertyValues method, the logon parameter values are loaded via the SettingsStorage.LoadOption and SettingsStorage.LoadBoolOption methods. In the WritePropertyValues method, the logon parameter values are saved via the SettingsStorage.SaveOption method. Non-string values should be converted to strings before saving. The RememberPassword property will be displayed in the Logon Window, together with the UserName and Password properties exposed by the AuthenticationStandardLogonParameters ancestor class. However, the RememberPassword property is not included in the authentication process.

To use custom logon parameters in the XAF application, specify the LogonParametersType property via the Application Designer.

Run the application.

Note

In an XAF Windows Forms application, the logon parameters are stored in the LogonParameters file, by default. In an XAF ASP.NET application, the logon parameters are stored in browser cookies. A separate cookie is created for each parameter. According to the accepted naming convention, each cookie name contains the application name and the parameter name. Note that the number of cookies per domain and the amount of information allowed to be stored in a cookie is limited.

In some scenarios, it can be required to store non-string logon parameters. If a persistent object is used as a logon parameter, you can store the string representation of its BaseObject.Oid property, or anther property that has a unique value (e.g. PermissionPolicyUser.UserName). The code below illustrates how to support the ICustomObjectSerialize interface in the CustomLogonParameters class demonstrated in the How to: Use Custom Logon Parameters and Authentication topic.

You can handle the XafApplication.LastLogonParametersRead, XafApplication.LastLogonParametersReading and XafApplication.LastLogonParametersWriting events to customize the process of saving and loading the logon parameters, instead of the approach described in this topic. Additionally, you can use custom settings storage by handling the XafApplication.CreateCustomLogonParameterStore event.

Expanded Inheritance Hierarchy

Expanded See Also

Is this topic helpful?​​​​​​​