How to test on startup if my app is licensed correctly

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
rdingwall
Posts: 3
Joined: Wed 25 Aug 2010 09:10
Location: London, UK

How to test on startup if my app is licensed correctly

Post by 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

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by 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.

Post Reply