OPC XML Configuration: Difference between revisions
From OPC Labs Knowledge Base
No edit summary |
|||
Line 3: | Line 3: | ||
In .NET Core and .NET 5.0+, some internal parameters of OPC XML-DA communication are configurable using [[High-Level Intrinsic Configuration]] mechanism. | 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. | 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.: | ||
* [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.basichttpbinding?view=dotnet-plat-ext-5.0 BasicHttpBinding Class] | ||
Line 10: | Line 10: | ||
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. | 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:10, 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.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
}
}
}