LOST WITH LICENSING

LOST WITH LICENSING

Postby JORGEMAL » Thu 21 Oct 2010 22:33

I am trying to run a web application I just uploaded to my server but I am getting a "License not found" message. I have read licensing documentation but I am still having trouble. Here is what I did.

1. I compiled my web site and saved it locally in my PC.
2. I uploaded the site to my server. Such a server does not have dotConnect installed.
3. From documentation I see there are 3 possible way to add licensing: Automatically, Manually and Licensing ASP.NET Applications.
4. I think that "Adding License Automatically" does not apply to my case because I have already added the PgSqlConnection component when I designed the application.
5. I followed instructions in "Adding License Manually" performing the steps in my PC but licenses.licx file remains blank. I did this in my PC so licensing is copied to the server when the site is uploaded. Please let me know what "Make sure is is embedded as a resource" means.
6. I also read instructions in "Licensing ASP.NET aplications" and tried to followed step 2. I created the App_License.dll in my PC so it gets copied to the server when I download the site.

I know I can perform a minimal installation in the server but I would not like to copy the whole 27MB executable.

Please let me know what I am doing wrong.

With respect,
Jorge Maldonado
JORGEMAL
 
Posts: 165
Joined: Thu 03 Jul 2008 23:55

Postby JORGEMAL » Sat 23 Oct 2010 21:39

I decided to perform the minimal installation because our server will be hosting several web sites and this way I will enable licensing in one shot.

Best regards,
Jorge Maldonado
JORGEMAL
 
Posts: 165
Joined: Thu 03 Jul 2008 23:55

Postby Shalex » Mon 25 Oct 2010 14:14

JORGEMAL wrote:5. I followed instructions in "Adding License Manually" performing the steps in my PC but licenses.licx file remains blank. I did this in my PC so licensing is copied to the server when the site is uploaded. Please let me know what "Make sure is is embedded as a resource" means.

1. Why does licenses.licx remain blank? Have you added the Devart.Data.PostgreSql.PgSqlConnection, Devart.Data.PostgreSql entry to it?
2. "Make sure it is embedded as a resource" means to set the Build Action property of the licenses.licx file to "Embedded Resource".

-------
The possible reason of the problem can be the following: if you compile your web site of target framework 4.0 with the version of dotConnect for PostgreSQL that is prior to 4.90.124, you will get the mentioned behaviour.
Solution in this case: either set the target framework of your web site to 2.0 or upgrade to the newer version of dotConnect for PostgreSQL.
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44

Postby JORGEMAL » Mon 25 Oct 2010 15:35

I do not find where to set the licenses file to "Embedded Resource". I have already read MSDN documentation and it says that I should find the Build Action Property in the properties of the file but all I get are the following 2 properties:
* File Name
* Full Path

Also, I am using the latest version of dotConnetct for PostgreSQL which is 4.95.180, .NET Framework 3.5 and VS2008 pro.

I am working with a web site and not a Windows Forms project, I wonder if this is important in this case.

I am also using DevExpress controls in my project and, every time I add a new control to my web form, it is also added to the licenses.licx file automatically; I do not see this behavior when I add the PgSqlDataSource. Is the Devart.Data.PostgreSql.PgSqlConnection, Devart.Data.PostgreSql entry enough or do I have to add version information?

With respect,
Jorge Maldonado
JORGEMAL
 
Posts: 165
Joined: Thu 03 Jul 2008 23:55

Postby Shalex » Tue 26 Oct 2010 10:36

There are two possible ways to add the license resource to Web Site:
1) automatically - run Devart License Wizard (the Tools > PostgreSQL > License Information menu of VS), go through its steps and recompile your application at the last step;
2) manually - create manually licenses.licx file in the folder of your Web Site, add Devart.Data.PostgreSql.PgSqlConnection, Devart.Data.PostgreSql in it (you can also try the full entry with the version as Devart License Wizard generates), choose Build Runtime Licenses to generate App_Licenses.dll in the Bin folder.

Does it help?

JORGEMAL wrote:I do not find where to set the licenses file to "Embedded Resource". I have already read MSDN documentation and it says that I should find the Build Action Property in the properties of the file but all I get are the following 2 properties:
* File Name
* Full Path

It is OK for Web Site.

Also please check the logs from Control Panel > Administrative Tools > Event Viewer > the Application tab.
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44

Postby JORGEMAL » Tue 26 Oct 2010 15:56

I selected the first choice (automatically) and I got the entry added to the licenses.licx file.

* Does this mean that my web site should work even if I remove the dotConnect for PostgreSQL minimal installation from the production server?

* If the above question is true, can I have several web sites working with different versions of dotConnect for PostgreSQL? For example, let's say that my production server is running 5 web sites and I want to upgrade from version 4.95 to version 5 all of them. Can I upgrade one by one having 2 entries in the licenses.licx, one for v4.95 and one for v5 until I finish?

By the way, where are you located? I see that there is a 5 hour difference between your time and mine.

Best regards,
Jorge Maldonado
JORGEMAL
 
Posts: 165
Joined: Thu 03 Jul 2008 23:55

Postby Shalex » Wed 27 Oct 2010 16:15

JORGEMAL wrote:Does this mean that my web site should work even if I remove the dotConnect for PostgreSQL minimal installation from the production server?

Yes, if you add the license resource to your web site (resource is embedded into App_Licenses.dll for Web Sites), the minimal installation is not necessary.
JORGEMAL wrote:If the above question is true, can I have several web sites working with different versions of dotConnect for PostgreSQL?

Yes, you can do that. Place the different versions of the Devart.* assemblies either to GAC or to the Bin folders of your web site. Make sure that there are the policy.*.Devart.* files in GAC in this case.

JORGEMAL wrote:For example, let's say that my production server is running 5 web sites and I want to upgrade from version 4.95 to version 5 all of them. Can I upgrade one by one having 2 entries in the licenses.licx, one for v4.95 and one for v5 until I finish?

The license resource in App_Licenses.dll is specific for a particular dotConnect for PostgreSQL version it was build with (the version that was installed on the build machine). So, it is necessary to rebuild App_Licenses.dll for every version of dotConnect for PostgreSQL. Otherwise, make the minimal install on your deployment server to avoid license check in runtime.
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL