Difference between revisions of "OPC XML Configuration"

From OPC Labs Knowledge Base
Jump to navigation Jump to search
(Created page with "Category:Configuration Category:High-Level Configuration Category:OPC XML Category:OPC XML-DA = Example = In order to set extremely high limits for the size o...")
 
Line 1: Line 1:
 
[[Category:Configuration]] [[Category:High-Level Configuration]] [[Category:OPC XML]] [[Category:OPC XML-DA]]  
 
[[Category:Configuration]] [[Category:High-Level Configuration]] [[Category:OPC XML]] [[Category:OPC XML-DA]]  
 +
= Introduction =
 +
In .NET Core and .NET 5.0+, some internal parameters of OPC XML-DA communication are configurable using [[High-Level Intrinsic Configuration]] mechanism.
 +
 +
Under the '''OpcXml.Da10.Service.OpcXml.Da10.Service''' key, you can configure parameters used for HTTP communication. Available for configuration are properties of the '''BasicHttpBinding''' class and its base classes, i.e.:
 +
 +
* [https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.basichttpbinding?view=dotnet-plat-ext-5.0 BasicHttpBinding Class]
 +
* [https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.httpbindingbase?view=dotnet-plat-ext-5.0 HttpBindingBase Class]
 +
* [https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.channels.binding?view=dotnet-plat-ext-5.0 Binding Class]
 +
 +
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 =
 
= 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:
 
In order to set extremely high limits for the size of received OPC XML-DA messages, you can use the following ''appsettings.json'' file:

Revision as of 12:09, 4 February 2021

Introduction

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

Under the OpcXml.Da10.Service.OpcXml.Da10.Service 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
    }
  }
}