License under window service

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
fad
Posts: 10
Joined: Wed 08 Oct 2014 13:08

License under window service

Post by fad » Wed 08 Oct 2014 13:23

Using the instruction at link: http://www.devart.com/dotconnect/oracle ... nsing.html
I was able to compile license for:
- console application
- dll
- console application that use dll file

I'm using mono 3.8.0.

Now I try to use a window service (with mono-service command).
When I start the service I have the following exception:

Assembly that contains embedded dotConnect for Oracle license cannot be used with this application: MyTestWindowService.
Please correct license information.


How can I do to resolve the issue..?
Best regards,
Fad.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: License under window service

Post by Pinturiccio » Fri 10 Oct 2014 15:33

Please tell us the following:
1. Which actions you perform for adding the license resource?
2. Which kind of project do you create?
3. Which IDE do you use - Visual Studio or MonoDevelop? If you use Visual Studio, please specify its version.
4. Please describe the structure of your solution. Which projects are built to *.exe and which are built to *.dll? Please also describe which projects use which.

fad
Posts: 10
Joined: Wed 08 Oct 2014 13:08

Re: License under window service

Post by fad » Fri 10 Oct 2014 16:55

Here http:\\www.arcoba.it\files\example.zip you can find an example for reproduce the issue.

I create the solution with Visual studio 2013 Express (version 12.0.21005.1)
The solution contains the following projects:
- Base (class library)
- WinService (empty solution where I've added some files)

Dependency: Base.dll is used by WinServie.exe

DevArt assembly use:
- Base.dll use DevArt assembly (in DbSession class)
- WinService.exe use DbSession class

I've added the license with following step:
a. Build solution
b. Create licenses.licx
c. Create license.config
d. Run command: lc /target:Base.dll /complist:licenses.licx /i:..\EtxLib\Devart.Data.Oracle.dll
e. adding the license file as embedded resource to Base project
f. build Base project
g. build WinService project

Then I've copied the assemblies to linux machine and I run the following command:
mono-service --debug -l:./file.lock -d:./ WinService.exe
Here http:\\www.arcoba.it\files\example.JPG you can find the screenshot with this command and its output.

I'm locking forward to hearing from you.
Best regards,
Stefano.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: License under window service

Post by Pinturiccio » Mon 13 Oct 2014 15:20

We could not reproduce the issue.
fad wrote:c. Create license.config
Make sure that the license.config file contains the line "MyTestWindowService.exe"
fad wrote:d. Run command: lc /target:Base.dll /complist:licenses.licx /i:..\EtxLib\Devart.Data.Oracle.dll
Please make sure that the licenses.licx and license.config files you have created are located in the same folder, and their path is specified in the /complist command. For example: /complist:"Path_to_files\licenses.licx"

When reproducing the issue we received two kinds of error messages:
1. Assembly that contains embedded dotConnect for Oracle license cannot be used with this application: MyTestWindowService.
This is your case. This error occurs when the licenses.licx file was used without the licenses.config file during the compillation.

2. Assembly that contains embedded dotConnect for Oracle license cannot be used with this application: MyTestWindowService.exe.
This exception occurs when licenses.config is present in the folder with licenses.licx, but does not contain the line:
MyTestWindowService.exe

fad
Posts: 10
Joined: Wed 08 Oct 2014 13:08

Re: License under window service

Post by fad » Tue 14 Oct 2014 07:29

Hi,
now I'm able to use MyTestWindowService with license.
The problem was in the path of license.config.

Thanks for support.

Best regards,
Stefano.

Post Reply