Skip to main content
All docs
V25.1
  • DeserializationSettings.RegisterTrustedAssembly(String) Method

    Enables deserialization of all data types from the assembly with the specified name.

    Namespace: DevExpress.Utils

    Assembly: DevExpress.Data.v25.1.dll

    NuGet Package: DevExpress.Data

    Declaration

    public static void RegisterTrustedAssembly(
        string assemblyName
    )

    Parameters

    Name Type Description
    assemblyName String

    The assembly name.

    Remarks

    DevExpress UI controls automatically detect potentially dangerous data types, block their deserialization, and throw a security-related exception.

    If you trust all types in a certain assembly, use the RegisterTrustedAssembly method to enable deserialization:

    DevExpress.Utils.DeserializationSettings.RegisterTrustedAssembly("CustomAssembly, Version=x.x.x.x, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx");
    DevExpress.Utils.DeserializationSettings.RegisterTrustedAssembly(typeof(CustomClass).Assembly); 
    

    Use the RegisterTrustedClass method to enable deserialization for a cpecific data type.

    Read the following topic for more information: Safe Deserialization.

    See Also