invalid license problem

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
phaggard
Posts: 5
Joined: Thu 09 Aug 2007 15:42

invalid license problem

Post by phaggard » Thu 09 Aug 2007 16:39

I have run across a problem which I'm sure others have...

I have a console application, which is a host server for remoting, which uses version 2.55.27.0 of the driver. The application previously used an older version of the driver (1.85) without problems. I have embedded the license information as a resource as described in the documentation and even copied the licenses.licx and .lcenses file to the same folder as the application, but it just does not work... all I get is an 'invalid license' exception.

What would still be causing this exception? We paid good money for this library, but it is useless to us if our hands are tied like this.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 10 Aug 2007 06:10

Check that *.licenses resource is present in compiled assembly.
Check that licenses.licx is included in your project.
What version of Visual Studio do you use?
Specify your hardware architecture: x32 or x64?
What version of PostgreSQLDirect .NET do you use (Std, Pro)?
Do you write class library (dll), executable application (exe), web project,
web project with dynamically compiled sources?
Do you compile your project in Visual Studio environment or using command line?

phaggard
Posts: 5
Joined: Thu 09 Aug 2007 15:42

Post by phaggard » Fri 10 Aug 2007 13:37

I've checked everything that you mentioned. I do have the licenses.licx included, however I am somewhat unclear on the *.licenses being in the compiled assembly as a resource - can that be checked with the MSIL Disassembler.. I do see where a .LICENSES file is created in the obj directory, so I would assume it is being created.

As far as your other questions - I am using Visual Studio 2005 on a x32 architecture machine. The version of the PostgreSQLDirect.NET is version 2.55.27.0, standard version. The code using the driver is a class library that is loaded for use in remoting.

I am also not clear on the use of licenses.config file. Since I am doing remoting I would imagine that I would have to refer to the executable that is hosting my dll in the config file.

My apologies for the questions, but the help documentation is really not all that clear in terms of getting the licensing to work properly. A How-To on the subject would be really helpful.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 10 Aug 2007 14:10

Please send to my address a test project to reproduce the problem on Windows.
Do not use third party components.

Zoran
Posts: 44
Joined: Thu 28 Apr 2005 21:55
Location: Zagreb, Croatia

License not valid

Post by Zoran » Fri 12 Oct 2007 12:57

I get sometimes (maybe once in 10000 HTTP requests) error "License not valid. Please view "Licensing" topic in PostgreSQLDirect .NET documentation for details or contact Core Lab technical support". The problem occurs in production server only. I use VS 2005, Corelab 3.2 provider for .Net 2.0 and Win2003 SE. VS solution contains about 40 projects, all of them using Corelab driver. After the error I can only restart IIS since all the following requests will produce the same error. I never used the mentioned licenses.licx but according to the documentation this error says that the license is wrong, but exists.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 15 Oct 2007 08:41

Do you have PostgreSQLDirect .NET installed on your production server?
In which project does the error occur? Is it possible to localize it?
Is there any possibility for me to reproduce the problem?

Zoran
Posts: 44
Joined: Thu 28 Apr 2005 21:55
Location: Zagreb, Croatia

Post by Zoran » Tue 16 Oct 2007 21:18

Yes, .Net 2.0 Corelab driver is installed on the production server. Windows lists assemblies Corelab.Data 4.2.14.0, Corelab.PostgreSql 3.20.17.0 and 2 more.
I think that the problem occurs in different projects. They handle connections in a similar manner.
I doubt that it will be possible to reproduce the problem since it happens so rarely.
OK, I thought that you might have some obvious reason. I will check a little more and will contact you again.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 17 Oct 2007 08:36

I will be looking forward to your feedback.

Zoran
Posts: 44
Joined: Thu 28 Apr 2005 21:55
Location: Zagreb, Croatia

Post by Zoran » Wed 31 Oct 2007 14:56

I reinstalled Windows and installed the newest Corelab driver only. No license error emerged during the last 7 days. I believe the problem is solved.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 01 Nov 2007 10:14

Good news.

Zoran
Posts: 44
Joined: Thu 28 Apr 2005 21:55
Location: Zagreb, Croatia

Post by Zoran » Thu 08 Nov 2007 21:56

Our IIS runs as a VM on VMware Server. There was indeed no error during maybe 10 days, when VM was using 1 CPU. However, after we configured it to use 2 CPUs, the errors started occuring again, 5-10 times daily. After we switched back to 1 CPU, there hasn't been a single error in a few days.

Zoran
Posts: 44
Joined: Thu 28 Apr 2005 21:55
Location: Zagreb, Croatia

Post by Zoran » Mon 12 Nov 2007 14:34

I can now report that the same problem happens when using direct-to-hardware Windows (without VMware). Out multi-CPU IIS crashes 10 - 20 times a day. Single CPU system never failed (but runs very slowly). I would appreciate some help since our users get impatient. Is it possible to use a simpler licensing system?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 12 Nov 2007 17:27

We will investigate this problem.
I'll let you know our thoughts as soon as possible.

Zoran
Posts: 44
Joined: Thu 28 Apr 2005 21:55
Location: Zagreb, Croatia

Post by Zoran » Thu 15 Nov 2007 13:22

Tonight we removed a switch between our web and database server. It seems that the switch was losing packets. After the change no error occurred. Maybe it is too early to conclude, but we believe that this was the cause of the problem. Therefore, multi-CPU IIS + packets lost = licence invalid. If the equation proves invalid, I will give you a report.
Besides, the faulty switch initiated hundreds of "idle in transaction" processes that decreased the performance of the application by at least 10 times.

Zoran
Posts: 44
Joined: Thu 28 Apr 2005 21:55
Location: Zagreb, Croatia

Post by Zoran » Thu 15 Nov 2007 13:56

Unfortunately the problem appeared again. Only the frequency is much lower with a good switch.

Post Reply