Closed cpipero closed 6 years ago
Quick update, it's working with the UA Sample Server
. It might be that I need security enabled on the others as well...
I got it working. 👍
My XML config file was misconfigured.
Here's a template from the '
I would not mind volunteering to add a detailed step-to-step explanation in the README of this sample for people to understand better. Let me know how.
<Extensions>
<ua:XmlElement>
<ua:ConfiguredEndpointCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://opcfoundation.org/UA/2008/02/Types.xsd"
xmlns:ua="http://opcfoundation.org/UA/SDK/Configuration.xsd">
<ua:KnownHosts />
<ua:Endpoints>
<ua:ConfiguredEndpoint>
<ua:Endpoint>
<!-- THIS USES THE SAMPLE SERVER THAT COMES WITH THE SAMPLES -->
<EndpointUrl>opc.tcp://localhost:51210/UA/SampleServer</EndpointUrl>
<SecurityMode>SignAndEncrypt_3</SecurityMode>
<SecurityPolicyUri>http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256</SecurityPolicyUri>
<UserIdentityTokens>
<UserTokenPolicy>
<TokenType>Anonymous_0</TokenType>
</UserTokenPolicy>
<UserTokenPolicy>
<TokenType>UserName_1</TokenType>
</UserTokenPolicy>
<UserTokenPolicy>
<TokenType>Certificate_2</TokenType>
</UserTokenPolicy>
</UserIdentityTokens>
<TransportProfileUri>http://opcfoundation.org/UA/profiles/transport/wsxmlorbinary</TransportProfileUri>
</ua:Endpoint>
<ua:UpdateBeforeConnect>true</ua:UpdateBeforeConnect>
<ua:SelectedUserTokenPolicy>0</ua:SelectedUserTokenPolicy>
</ua:ConfiguredEndpoint>
<!-- HERE YOU CONFIGURE OTHER SERVERS -->
<ua:ConfiguredEndpoint>
<ua:Endpoint>
<EndpointUrl>opc.tcp://[HOSTNAME1]:[PORT]</EndpointUrl>
<SecurityMode>SignAndEncrypt_3</SecurityMode>
<SecurityPolicyUri>http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256</SecurityPolicyUri>
<UserIdentityTokens>
<UserTokenPolicy>
<TokenType>Anonymous_0</TokenType>
</UserTokenPolicy>
<UserTokenPolicy>
<TokenType>UserName_1</TokenType>
</UserTokenPolicy>
<UserTokenPolicy>
<TokenType>Certificate_2</TokenType>
</UserTokenPolicy>
</UserIdentityTokens>
<TransportProfileUri>http://opcfoundation.org/UA/profiles/transport/wsxmlorbinary</TransportProfileUri>
</ua:Endpoint>
<ua:UpdateBeforeConnect>true</ua:UpdateBeforeConnect>
<ua:SelectedUserTokenPolicy>0</ua:SelectedUserTokenPolicy>
</ua:ConfiguredEndpoint>
<ua:ConfiguredEndpoint>
<ua:Endpoint>
<EndpointUrl>opc.tcp://l[HOSTNAME2]:[PORT]</EndpointUrl>
<SecurityMode>SignAndEncrypt_3</SecurityMode>
<SecurityPolicyUri>http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256</SecurityPolicyUri>
<UserIdentityTokens>
<UserTokenPolicy>
<TokenType>Anonymous_0</TokenType>
</UserTokenPolicy>
<UserTokenPolicy>
<TokenType>UserName_1</TokenType>
</UserTokenPolicy>
<UserTokenPolicy>
<TokenType>Certificate_2</TokenType>
</UserTokenPolicy>
</UserIdentityTokens>
<TransportProfileUri>http://opcfoundation.org/UA/profiles/transport/wsxmlorbinary</TransportProfileUri>
</ua:Endpoint>
<ua:UpdateBeforeConnect>true</ua:UpdateBeforeConnect>
<ua:SelectedUserTokenPolicy>0</ua:SelectedUserTokenPolicy>
</ua:ConfiguredEndpoint>
</ua:Endpoints>
</ua:ConfiguredEndpointCollection>
</ua:XmlElement>
</Extensions>
I have been fighting with these for a few days on and off.
I could not find specific instructions on how to configure the Aggregation Server to talk to other servers. I figured I'd add settings to the
Quickstarts.AggregationServer.Config.xml
file.The one place that made sense was in the
Extensions
section within theConfiguredEndpointsCollection
.Here's an excerpt of my current file:
I can see in Debug that those Endpoints are added correctly in the server by breaking at line 71 of
AggregationServer.cs
where it loops through all those found in configuration.But the client just enumerates a few
Root
folders (as many as the servers that I aggregate` but returns an error if I try browsing.Here's a relevant chunk of the
AggregationServer.log.txt
file:You can see that the certs go through (I think) but then it closes....
If there is any instruction (that I cannot find) on how to do this right, it'll help me tremendously. Thanks
Cos