OPC XML Configuration

From OPC Labs Knowledge Base
Revision as of 16:35, 30 May 2024 by User (talk | contribs) (→‎Introduction)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

In .NET Core and .NET 6+, some internal parameters of OPC XML-DA communication are configurable using High-Level Intrinsic Configuration mechanism.

Under the OpcXml.Da10.Service.BasicHttpBinding key, you can configure parameters used for HTTP communication. Available for configuration are properties of the BasicHttpBinding class and its base classes, i.e.:

Note that some of the configured binding properties can get overriden by the code. Specifically, settings under BasicHttpBinding.Security are overriden if a network credential with non-empty user name is provided for OPC XML-DA communication.

Example

In order to set extremely high limits for the size of received OPC XML-DA messages, you can use the following appsettings.json file:

{
  "OpcXml.Da10.Service": {
    "BasicHttpBinding": {
      "MaxBufferSize": 2147483647,
      "MaxReceivedMessageSize": 2147483647
    }
  }
}