Skip to main content
All docs
V23.2

DeserializationSettings.RegisterTrustedAssembly(Assembly) Method

Enables deserialization of all data types from the specified assembly.

Namespace: DevExpress.Utils

Assembly: DevExpress.Data.v23.2.dll

NuGet Package: DevExpress.Data

Declaration

public static void RegisterTrustedAssembly(
    Assembly assembly
)

Parameters

Name Type Description
assembly Assembly

The assembly.

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