Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFGlobalSettings.EnableBinaryFormatter Property

  • Last UpdatedJan 12, 2026
  • 2 minute read
AFGlobalSettings.EnableBinaryFormatter Property
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: Boolean
Returns 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.

Note Notes to Callers
This method, property, or class is not available in the .NET 8 version of the SDK.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 2.10.11

See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in