Page 1 of 1
License with .NET standard libraries
Posted: Sun 28 May 2017 15:17
by powelerl
Hi,
I have problems getting my license to work with the new scheme for .NET standard libraries.
Quote from
https://www.devart.com/dotconnect/oracl ... ndard.html
Purchased dotConnect for Oracle Licensing
After you purchased dotConnect for Oracle, you will get a email with the license key. You can also view your key in the Registered User Area, where you download your licensed product installers.
You must add this license key to the License Key connection string parameter.
I can find "Activation Key" for dotConnect for Oracle Professional v9.4.280 at
https://secure.devart.com/Licenses.aspx. This key does not work when entered in OracleConnectionStringBuilder.LicenseKey. I get the exception Devart.Common.LicenseException: 'Feature is not supported.'
I downloaded the v9.4.280 installer. The professional package did not help - I don't think it actually installs any license onto the system. But I installed the trial package, which works, so for now I can do some development at least.
Help appreciated
Re: License with .NET standard libraries
Posted: Mon 29 May 2017 16:38
by Shalex
Please follow this walkthrough:
1. Create a test .NET Core project via Visual Studio > File > New > Project > Installed > Templates > Visual C# > .NET Core > Console Application (.NET Core).
2. Download Devart package via Tools > NuGet Package Manager > Package Manager Console:
Code: Select all
PM> install-package Devart.Data.Oracle.EFCore -Source:"https://www.nuget.org/api/v2/"
3. Run the code:
Code: Select all
var builder = new Devart.Data.Oracle.OracleConnectionStringBuilder();
builder.Direct = true;
builder.Server = "...";
builder.Sid = "...";
builder.UserId = "...";
builder.Password = "...";
builder.LicenseKey = @"..."; // that is "Activation Key" in Customer Portal
var conn = new Devart.Data.Oracle.OracleConnection(builder.ConnectionString);
conn.Open();
Does it work?
Re: License with .NET standard libraries
Posted: Tue 30 May 2017 14:00
by powelerl
Yes, it works, and I discovered the reason why mine fails. I am using the .NET Standard Devart dlls with an application running on .NET Framework 4.6. If I switch to netcoreapp1.1 it works, but that is not a solution for me.
Problem is that the old licensing ceased to work when switching to the .NET Standard dlls (no code or setup changes, license file generated a long time a go). So what license model should I use in this case: the old or the new?
Re: License with .NET standard libraries
Posted: Wed 31 May 2017 09:00
by Shalex
Current implementation for the licensed version:
powelerl wrote:Problem is that the old licensing ceased to work when switching to the .NET Standard dlls (no code or setup changes, license file generated a long time a go). So what license model should I use in this case: the old or the new?
Please use
.NET Standard licensing approach with the .NET Standard dlls.
Re: License with .NET standard libraries
Posted: Wed 31 May 2017 10:03
by powelerl
Thanks, that was what I expected. I needed to be 100% sure though.
So .NET Standard assemblies can be used on multiple platforms, including .NET Core. It can also be used on Xamarin, .NET Framework and more.
The test you provided works for a .NET Core application, but not for an .NET Framework application (due to a licensing exception).
Shalex wrote:Please follow this walkthrough:
1. Create a test .NET Core project via Visual Studio > File > New > Project > Installed > Templates > Visual C# > .NET Core > Console Application (.NET Core).
2. Download Devart package via Tools > NuGet Package Manager > Package Manager Console:
Code: Select all
PM> install-package Devart.Data.Oracle.EFCore -Source:"https://www.nuget.org/api/v2/"
3. Run the code:
Code: Select all
var builder = new Devart.Data.Oracle.OracleConnectionStringBuilder();
builder.Direct = true;
builder.Server = "...";
builder.Sid = "...";
builder.UserId = "...";
builder.Password = "...";
builder.LicenseKey = @"..."; // that is "Activation Key" in Customer Portal
var conn = new Devart.Data.Oracle.OracleConnection(builder.ConnectionString);
conn.Open();
Does it work?
Now, open the csproj file and change the target framework to .NET Framework v4.6.
<TargetFramework>net46</TargetFramework>
Then you get an exception, right?
Re: License with .NET standard libraries
Posted: Fri 02 Jun 2017 13:26
by Shalex
powelerl wrote:So .NET Standard assemblies can be used on multiple platforms, including .NET Core. It can also be used on Xamarin, .NET Framework and more.
We didn't test our .NET Standard assemblies with Xamarin, so we do not guarantee a full compatibility with Xamarin.
powelerl wrote:The test you provided works for a .NET Core application, but not for an .NET Framework application (due to a licensing exception).
We will investigate this scenario and notify you about the result.
Re: License with .NET standard libraries
Posted: Wed 14 Jun 2017 06:04
by ChangHyeon Lee
I am experiencing a similar problem.
I created a simple console program using .NET standard libraries.
The target framework of my project file is as follows.
...
<TargetFramework>netcoreapp1.1</TargetFramework>
...
If I move the compiled binaries to
Linux, I get the following error:
Code: Select all
Unhandled Exception: Devart.Common.LicenseException: Feature is not supported.
at d.le.clv.Vld(Int32 pe)
at Devart.Data.Oracle.OracleInternalConnection..ctor(bz connectionOptions, OracleInternalConnection proxyConnection)
at Devart.Data.Oracle.by.a(g A_0, Object A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, g A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)
at Devart.Common.DbConnectionFactory.b(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.Oracle.OracleConnection.Open()
at ConsoleApp2.Program.Main(String[] args)
Aborted
Here is the code I wrote:
Code: Select all
static void Main(string[] args)
{
Console.OutputEncoding = System.Text.Encoding.UTF8;
var builder = new Devart.Data.Oracle.OracleConnectionStringBuilder("User ID=YYYYYYYY; Password=XXXXXXXX; Direct=true; Host=111.111.111.111; Service Name=ZZZZZZ; Port=1521;");
builder.LicenseKey = @"My Activation Key";
Devart.Data.Oracle.OracleConnection oraConnection = new Devart.Data.Oracle.OracleConnection(builder.ConnectionString);
oraConnection.Unicode = true;
oraConnection.Open();
Devart.Data.Oracle.OracleCommand command = new Devart.Data.Oracle.OracleCommand();
command.Connection = oraConnection;
Devart.Data.Oracle.OracleDataReader dataReader = null;
command.CommandText = "SELECT SEQ, NAME FROM TABLE";
int i = 0;
dataReader = command.ExecuteReader();
while (dataReader.Read() && i < 10)
{
Decimal seq = (Decimal)dataReader.GetValue(0);
string name = "";
if (!dataReader.IsDBNull(1))
name = (string)dataReader.GetValue(1);
Console.WriteLine(string.Format("{0}\t{1}", seq, name));
i++;
}
oraConnection.Close();
Console.ReadLine();
}
If I run it in
Windows, it works fine.
In addition, dotConnect for MySQL generates the same error.
What is the problem?
Re: License with .NET standard libraries
Posted: Wed 14 Jun 2017 19:13
by Shalex
Currently Linux is not supported (applying the License Key value fails). We are investigating the issue and will notify you about the result.
Re: License with .NET standard libraries
Posted: Wed 28 Jun 2017 12:27
by Shalex
The new build (
v9.4.299) includes the following improvements:
- The bug with applying the License Key connection string parameter (concerns .NET Standard 1.3 compliant assemblies only) on Linux is fixed
- The bug with applying the License Key connection string parameter (concerns .NET Standard 1.3 compliant assemblies only) in .NET Framework projects is fixed