Page 1 of 1

License not valid. DbProviderFactory mode

Posted: Thu 16 Aug 2007 15:37
by Alladin
I have CoreLab.Oracle professional installed on my development machine.
My project references CoreLab.Oracle.dll and have corresponding license.licx file. When I create OracleConnection with new(), connection can be opened problemless.

However, another assembly which is used in my project, accesses database in generic way, like this:
DbProviderFactory factory = DbProviderFactories.GetFactory("CoreLab.Oracle");

IDbConnection result = factory.CreateConnection();

conn.ConnectionString = ConnectionString;
conn.Open(); <-- Here I get an exception about Licensing...
How do I make this invalid Licensing exception go away?

Posted: Thu 16 Aug 2007 16:55
by Alladin
Further investigation brought more light on the problem.

Looks like two licensing schemes do not coexist in one application.

If I remove reference to CoreLab.Oracle.dll & license.licx, then DbProviderFactory works.

In other words, you may break functionality of referenced assembly just by including CoreLab.Oracle in your project. What sounds really bad.

Posted: Fri 17 Aug 2007 07:06
by Alexey
Could you send me a sample to alexeyi at crlab dot com?

Posted: Fri 17 Aug 2007 18:26
by Alladin
I made a simple project to illustrate the problem, but cannot reproduce the error.

I've checked resources in reflector. The dll that references CoreLab.Oracle.dll has resource named *.dll.licenses with DevExpress & CoreLab types.

What's going wrong in my own project, I don't know. But debugging it, I can easily reproduce the error.

What can I do more to dig this problem deeper?

Posted: Mon 20 Aug 2007 16:21
by Alexey
Is your project complex? Heavy? Could you try to start simplifying it until the problem vanishes?