Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Specifying security policy, user name and password

More
11 Sep 2014 15:25 - 11 Sep 2014 15:32 #2274 by support
Replied by support on topic Specifying security policy
A. Selection of Specific Endpoint

QuickOPC (currently) does not allow you to specify precisely the endpoint parameters. Instead, it uses a negotiation algorithm, and a so-called endpoint selection policy, to choose the parameters of the communication.

The closest you get is probably as follows:

var client = new EasyUAClient
{
    Isolated = true,
    IsolatedParameters =
    {
        Session = 
        { 
             EndpointSelectionPolicy =
             {
                AllowedMessageSecurityModes = UAMessageSecurityModes.SecuritySignAndEncrypt, 
                MessageSecurityPreference = Sign.Positive
             } 
        }
    }
};

This takes care of the Sign&Encrypt part, but does not enforce the Basic256 part.


B. Specifying User name and Password

This is easy. Example code:

var client = new EasyUAClient
{
     Isolated = true,
     IsolatedParameters = 
     { 
         Session = { UserIdentity = { UserNameToken = { UserName = "usr", Password = "pwd" }}}
     }
};
Best regards
Last edit: 11 Sep 2014 15:32 by support.

Please Log in or Create an account to join the conversation.

More
11 Sep 2014 15:12 #2273 by support
From: OPC Labs Contact Form - O.
Sent: Thursday, September 11, 2014 5:07 PM
To: Zbynek Zahradnik
Subject: OPC Labs Contact Form - EasyOpc.UA

[...]
Hello

I am evaluating EasyOpc.UA. I would like to connect to an OPC UA server with Security policy = Basic256, Message Security mode = Sign & Encrypt and a username/password.

I was unable to find any documentation on how to configure the EasyUAClient to connect with the mentioned security policy. Nothing in the forums either.

Could you please provide some sample code in C# ?

Quick reply appreciated.

Thanks.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.043 seconds