Hi, I want my app to fall over immediately when you try to start it (fail fast) if it's not licensed correctly... I don't want to wait until you enter a connection string and issue the first DB query.
Which classes/methods in devart invoke the license checks? I know OracleConnection.Open() does, but is there anything that doesn't require a valid connection string I can call? LicenseManager.IsValid() or something?
Cheers Rich
How to test on startup if my app is licensed correctly
Yes, you are right. A valid license resource is required to execute OracleConnection.Open() - calling this method is the only way in run time to make license validation be performed. Actually, the license check is made earlier than parsing connection string. So if you set an empty connection string, OracleConnection.Open() will generate:
1) the "License not found" error if no valid license resource is found;
2) the "ConnectionString property not initialized." error if the technical license is valid.
Be aware, no license check is performed on the workstation where dotConnect for Oracle is installed. Please check the license on the "clear" machine.
You can also check in design time if your application has a valid license resource via the Tools > Oracle > License Information menu of Visual Studio.
1) the "License not found" error if no valid license resource is found;
2) the "ConnectionString property not initialized." error if the technical license is valid.
Be aware, no license check is performed on the workstation where dotConnect for Oracle is installed. Please check the license on the "clear" machine.
You can also check in design time if your application has a valid license resource via the Tools > Oracle > License Information menu of Visual Studio.