LicenseException with PgSqlAlerter on .net core 2.0

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
evk
Posts: 4
Joined: Fri 01 Sep 2017 15:34

LicenseException with PgSqlAlerter on .net core 2.0

Post by evk » Wed 24 Jan 2018 12:34

I create PgSqlAlerter like this in .NET Core 2.0 application running on linux (CentOS 7):

Code: Select all

    _dbListener = new PgSqlAlerter(new PgSqlConnection(cs), _syncItemName);
    _dbListener.Alert += OnDatabaseNotification;
    _dbListener.Error += OnDatabaseListenerError;
    _dbListener.Stopped += OnDatabaseListenerStopped;
    _dbListener.Start(); 
    
Where `cs` is connection string with "License Key" parameter with valid (non-trial) license key. This connection string works for regular database queries, but doesn't work with `PgSqlAlerter` which gives the following exception in `Start`:

Unhandled Exception: Devart.Common.LicenseException: Feature is not supported.
at d.le.clv.Vld(Int32 pe)
at Devart.Data.PostgreSql.PgSqlAlerter.Start()

Is PgSqlAlerter not supported on .NET Core or is it something different?

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

Re: LicenseException with PgSqlAlerter on .net core 2.0

Post by Shalex » Mon 29 Jan 2018 11:39

Thank you for your report. We have reproduced the issue and will notify you when it is fixed.

As a workaround, please call conn.Open() before using PgSqlAlerter. This will avoid a license check by PgSqlAlerter.

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

Re: LicenseException with PgSqlAlerter on .net core 2.0

Post by Shalex » Thu 15 Feb 2018 17:17

The bug with using PgSqlAlerter in .NET Core projects is fixed: viewtopic.php?f=3&t=36600.

Post Reply