Devart.Common.LicenseException: Feature is not supported

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
cbiegner
Posts: 8
Joined: Thu 24 Nov 2016 15:52

Devart.Common.LicenseException: Feature is not supported

Post by cbiegner » Thu 31 May 2018 09:53

I just built a simple Windows Console Application (.NET Framework) using DevArt Entities. When running this App locally on my dev machine (where dotConnect for Oracle is fully installed) everything works as expected.

When building the app and copying the bin/Release/ folder to a machine with just -NET Framework installed I get an error Devart.Common.LicenseException: Feature is not supported.
Image

I checked the License information in Visual Studio: Everything is OK. The .licx file in ist the Properties folder.
Image

The part of the Code the Exception is referring to is simple:
Image

I used the latest version of the nuget Packages:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Devart.Data" version="5.0.1944" targetFramework="net462" />
  <package id="Devart.Data.Oracle" version="9.5.520" targetFramework="net462" />
  <package id="Microsoft.Win32.Registry" version="4.5.0" targetFramework="net462" />
  <package id="System.Reflection.Emit" version="4.3.0" targetFramework="net462" />
  <package id="System.Reflection.Emit.ILGeneration" version="4.3.0" targetFramework="net462" />
  <package id="System.Security.AccessControl" version="4.5.0" targetFramework="net462" />
  <package id="System.Security.Principal.Windows" version="4.5.0" targetFramework="net462" />
</packages>
so what did I do wrong?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Devart.Common.LicenseException: Feature is not supported

Post by Shalex » Fri 01 Jun 2018 15:51

Current implementation of dotConnect for Oracle includes two sets of assemblies:

-> the .NET Framework Devart.* assemblies which are shipped with installation:
* assemblies are created in C:\Program Files (x86)\Devart\dotConnect\Oracle\ (by default)
* licensing approach is described at https://www.devart.com/dotconnect/oracl ... nsing.html

-> the .NET Standard (.NET Core) Devart.* assemblies which are available via NuGet:
* you can download packages from https://www.nuget.org/packages/devart.d ... cle.efcore
* licensing approach is described at https://www.devart.com/dotconnect/oracl ... ndard.html
cbiegner wrote:I get an error Devart.Common.LicenseException: Feature is not supported.
1. The error says that .NET Standard runtime cannot find the license key.
Please get your License Key using credentials (URL, account name, and password) that were sent to you after the purchase of our product, then press View in the "Activation Key" column against the product dotConnect for Oracle.
Add "License Key=your_value_here;" to your connection string.
cbiegner wrote:I just built a simple Windows Console Application (.NET Framework)
2. With Target framework=.NET Framework (not .NET Core), CLR looks for the referenced assembly in the GAC first (!).

So:
* CLR finds .NET Framework Devart.* assemblies (they are copied to GAC by installation) and uses them in your dev env
* there are no .NET Framework Devart.* assemblies in GAC in your prod env, and CRL employs .NET Core Devart.* assemblies downloaded from NuGet

Run your project in the debug mode, navigate to Debug > Windows > Modules and check Path values of Devart.* assemblies loaded in the process of your application:
* .NET Framework Devart.* assemblies are loaded from C:\Windows\assembly\GAC_MSIL\
* .NET Core Devart.* assemblies are loaded from C:\Users\xxxxx\.nuget\packages\ or the \packages\ folder of your project

A solution would be:
a) in dev env, remove Devart.* and policy.*.Devart.* files/folders from GAC 2.0 (\Windows\assembly\GAC_MSIL\) and GAC 4.0 (\Windows\Microsoft.NET\assembly\GAC_MSIL\). For this, use some file manager like https://x-diesel.com/
b) add "License Key=your_value_here;" to your connection string

cbiegner
Posts: 8
Joined: Thu 24 Nov 2016 15:52

Re: Devart.Common.LicenseException: Feature is not supported

Post by cbiegner » Fri 08 Jun 2018 08:41

Thanks for your answer. Just to get this clear: If I got a WebApplication using dotConnect for Oracle, the usual way to get this working in Production Environment is to install dotConnect for Oracle on the Web Server?

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

Re: Devart.Common.LicenseException: Feature is not supported

Post by Pinturiccio » Mon 11 Jun 2018 14:25

You can install dotConnect for Oracle on the production computer with "Minimal installation" settings (according to our License Agreement this is the only installation you can perform on customers computers).

When you install dotConnect for Oracle with "ASP.NET Providers" option on a computer, the corresponding records are automatically added to the machine.config. If there are no such records in the config file of the application, they are taken from the machine.config. But there are no such records in machine.config on the production computer if dotConnect for Oracle is not installed with "ASP.NET Providers" option.

You can find the records that you need to add to the config file of the application in our documentation:
https://www.devart.com/dotconnect/oracl ... cific.html

Besides, you must add the license resource to your project and deploy the project together with the necessary Devart assemblies. For more information, please refer to
https://www.devart.com/dotconnect/oracl ... yment.html
https://www.devart.com/dotconnect/oracl ... g.html#asp

Post Reply