AFGlobalSettings.EnableBinaryFormatter Property
- Last UpdatedJan 12, 2026
- 2 minute read
- PI System
- AF SDK 3.2.0
- Developer
Indicates if BinaryFormatter should be enabled on the system.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.2.0.7
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 is disabled in the AFSDK. Set to to enable BinaryFormatter serialization and deserialization. The default value is .
Remarks
When enabled, objects are serialized and deserialized with BinaryFormatter. 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. |