How to test on startup if my app is licensed correctly

How to test on startup if my app is licensed correctly

Postby rdingwall » Wed 25 Aug 2010 09:14

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
rdingwall
 
Posts: 3
Joined: Wed 25 Aug 2010 09:10
Location: London, UK

Postby Shalex » Thu 26 Aug 2010 09:59

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.
Shalex
Devart Team
 
Posts: 7793
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle