AFGlobalSettings.EnableBinaryFormatter Property
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Indicates if BinaryFormatterDeserialize should be enabled on the system.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static bool EnableBinaryFormatter { get; set; }
Public Shared Property EnableBinaryFormatter As Boolean Get Set Dim value As Boolean value = AFGlobalSettings.EnableBinaryFormatter AFGlobalSettings.EnableBinaryFormatter = value
public: static property bool EnableBinaryFormatter { bool get (); void set (bool value); }
static member EnableBinaryFormatter : bool with get, set
Property Value
Type: BooleanReturns if BinaryFormatter Deserialize is disabled in the AFSDK. Set to to enable the Deserialize method. The default value is .
Remarks
When enabled, all objects that were previously serialized utilizing BinaryFormatter can be read and deserialized properly. By default this method is disabled to avoid potential security concerns with the BinaryFormatter class.
The default value for this property is read from the SDK's configuration file in the OSI directory under the CommonApplicationData directory. This default value will be the default for all clients executed on the computer. If this property is modified in the client, then it will only affect the current client and the modified value will not be persisted.
| This method, property, or class is not available in the .NET 8 version of the SDK. |