.Net Client with new License file won’t connect

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
rhilgartgeip
Full Member
Full Member
Posts: 6
Joined: 06 Jun 2013, 16:59

.Net Client with new License file won’t connect

Post by rhilgartgeip »

I have a new license file registered in my client as so:
ApplicationLicenseManager.AddProcessLicenses(System.Reflection.Assembly.GetExecutingAssembly(), "license.lic");
Now when I try to connect to the server I get the following error.
“Client Product URI does not match the license Product URI”
I don’t know how to view the License Product URI but the client URI is as follows:
“ApplicationURI = urn:InsertComputerName:InsertCompanyName:IP_UA_OPCUA_TestClient@localhost”
(if this is the product uri or just the application uri don’t know if they are the same)
I have based my code on the examples and cannot find the difference where the ApplicationURI is setup in the example but not in my code.
I have added the same data with changes for my product from the example client App.config file but I am unable to update my ApplicationURI properly.
Has anyone had a similar problem that they were able to solve.
Thanks

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: .Net Client with new License file won’t connect

Post by Support Team »

Hi rhilgartgeip,

as you can see in the documentation (Configuration Schema) in section "Client Settings", the ProductUri of the client "is a globally unique identifier for the product that client belongs to. If not specified then the default is an empty string.". So your new license file is licensed against this unique URI. Please set your licensed string in the App.config file like this:

Code: Select all

<Extension>
  <ClientSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
    <ProductUri>YOUR_LICENSED_UR</ProductUri>
  </ClientSettings>
</Extension>

Best regards
Support Team

rhilgartgeip
Full Member
Full Member
Posts: 6
Joined: 06 Jun 2013, 16:59

Re: .Net Client with new License file won’t connect

Post by rhilgartgeip »

Thanks for the reply
I now have my ApplicationURI updating properly and no longer get the original error. However I now get a new error much the same as the old only for the server URI.
“Server Product URI does not match the license Product URI”
When I remove the Server license node from the license file then I am able to connect to the server with no errors.
However I still get the popup warning that this is a demo version so I don't seem to be using the license properly.
Don't know if removing the Server key from the license file is the appropriate thing to do.
Thanks again

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: .Net Client with new License file won’t connect

Post by Support Team »

Hi rhilgartgeip!

The license of the Server behaves like the Client and is described in the section "ServerSettings" on this documentation side: Configuration Schema. Like the error message ("Server Product URI does not match the license Product URI") says, you have not set the correct ProductUri in your App.config file.
Just add in your App.config the following line:

Code: Select all

<Extension>
    <ServerSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
        <ProductUri>YOUR_LICENSED_PRODUCT_URI</ProductUri>
        <ProductName>YOUR_PRODUCT_NAME</ProductName>
    </ServerSettings>
</Extension>
Best regards
Support Team

Post Reply