Getting a licensing error when running program under XP

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
TonyV
Posts: 74
Joined: Wed 25 May 2011 15:03

Getting a licensing error when running program under XP

Post by TonyV » Thu 01 Dec 2011 22:14

I'm working on a program that will run as a Windows service and needs to access a PostgreSql database using entity framework.

I am developing on Windows 7 using MS Visual Studio 2010. Everything works fine when I run the application on my workstation. In fact, I'm extremely happy with the way everything is running on this machine.

I need to test this any my other WPF application on XP -- They work together. I copied the executables and config files onto a thumbdrive and then copied them onto the XP machine. When I start the windows service program, I'm getting the following error in the event log:

Code: Select all

2011-12-01 16:59:37,019 [1] ERROR StampReads::StampReads [(null)] - Unable to retrieve the Site with ID 438a42bc-9d7c-4651-bd76-ec2ff1089524: An error occurred while trying to retrieve a Site because an error occurred in the database during the operation.
The underlying provider failed on Open. (Exception class EntityException)
Assembly that contains embedded dotConnect for PostgreSQL license cannot be used with this application: LPRCore.exe. 
Please correct license information. (Exception class PgSqlException)
I boned up on the licensing topic in the documentation and I added a license.licx file to the LPRCore.exe program. I checked the executable using .NET Reflector & I can see the file's contents embedded in the LPRCore.exe's resources. But I'm still gettign this error on the XP machine.

What do I have to do to make this work?

Regarding my WPF program:

I am now getting the following message when this program first tries to retrieve data from the PostgreSql database ON THE SAME XP MACHINE:

Code: Select all

Could not load file or assembly Devart.Data.PostgreSql Version 5.30.172.0 Culture=neutral, ....
The Devart DLLs are used by a class library and the ones it references are the versions from the September release (Devart.Data.PostgreSql Version 5.50.214.0).

I have even deleted the references to the Devart DLLs and added them back into the DLL with no difference. Everything runs fine on my development workstation but I get the same error about the wrong DLL version on XP.

Here is the contents of the licenses.licx file in this class library:

Code: Select all

Devart.Data.PostgreSql.PgSqlConnection, Devart.Data.PostgreSql, Version=5.50.214.0, Culture=neutral, PublicKeyToken=09af7300eec23701
What is causing this issue?

Tony

TonyV
Posts: 74
Joined: Wed 25 May 2011 15:03

This is resolved

Post by TonyV » Fri 02 Dec 2011 15:30

I discovered that the App.config for my WPF application had a reference to the previous version of the Devart.Data.PostgreSql.dll file. I updated the version number and now that issue is resolved.

I also used the licensing wizard to add another DLL in the project to the list of those that can call the DLL that uses Devart.Data.PostgreSql.dll in my Windows Service project and that fixed the error I was getting in that program.

So all of the licensing & versioning issues I had when I posted this are now resolved.

I'm still having the problem I previously reported with the Entity Framework not working. I'm going to go look into your latest response on that and see if I can't get it working today.

Tony

Post Reply