I recently bought a "single developer + free runtime" QuickOPC license, Application is getting fails after two hours with "Run time is over the limit in license "Multipurpose".
After deployment on IIS , by default it running well ( trial period mode) and communication with PLC but when ever apply the license copy it giving error message.
I have tried in both way:
1.installed the License by License manger UI ,application is not reading this license , after running same time it's stop the communication with PLC data.
2.Embed the License with Application dll then below error message is coming.
1. Exception Type
TypeInitializationException
Message
The type initializer for 'OpcLabs.EasyOpc.UA.Toolkit.ClientServer.UAClientEngineBase' threw an exception.
2. Exception Type
ArgumentException
Message
Attempt to add existing key into a dictionary.
Code snippet:
public static void RegisterManagedResource()
{
try
{
// Register a license that is we embed as a managed resource in this program.
// The first two arguments should always be "QuickOPC" and "Multipurpose".
// The third argument determines the assembly where the license resides.
// The fourth argument is the namespace-qualified name of the managed resource.
if (SerialNumber() == false)
{
LicensingManagement.Instance.RegisterManagedResource("QuickOPC", "Multipurpose",
Assembly.GetExecutingAssembly(),
"PSGCalibration.Licen.Key-Permanent-WebForm-1999224827-20191120.bin");
// Instantiate the client object, obtain the serial number from the license info, and display the serial number.
var client = new EasyUAClient();
long serialNumber = (uint)client.LicenseInfo["Multipurpose.SerialNumber"];
Console.WriteLine("SerialNumber: {0}", serialNumber);
}
}
catch(Exception ex)
{
Logger.Log(ex);
}
}
public static Boolean SerialNumber()
{
Boolean flag = false;
try
{
// Instantiate the client object.
var client = new EasyUAClient();
// Obtain the serial number from the license info.
long serialNumber = (uint)client.LicenseInfo["Multipurpose.SerialNumber"];
// Display the serial number.
Console.WriteLine("SerialNumber: {0}", serialNumber);
// Determine whether we are running as demo or trial.
if ((1111110000 <= serialNumber) && (serialNumber <= 1111119999))
{
flag = false;
Console.WriteLine("This is a stock demo or trial license.");
}
else
{
Console.WriteLine("This is not a stock demo or trial license.");
flag = true;
}
}
catch(Exception ex)
{
flag = false;
Logger.Log(ex);
}
return flag;
}
Please resolve this issue.
Thanks,
TM