Search code examples
c#ado.netfirebird

Unable to connect to Firebird server from ADO.net


I recently downloaded the new Firebird 4 server and installed it. It's running as a service on my Windows 10 box. I'm able to connect to it just fine with the FB Maestro IDE, but when I try to connect to it from some ADO.NET code, I get an error. Upon calling await connection.OpenAsync (where connection is a FirebirdSql.Data.FirebirdClient.FbConnection instance):

FirebirdSql.Data.Common.IscException: 'Error occurred during login, please check server firebird.log for details'

Looking at the server log, I see the following two errors, repeated various times:

DESKTOP-NAME Thu Jun 24 15:14:32 2021 Authentication error No matching plugins on server

DESKTOP-NAME Thu Jun 24 15:14:35 2021 INET/inet_error: read errno = 10054, client host = DESKTOP-NAME, address = 127.0.0.1/54653, user = Mason

I have no idea what this means, and some basic searching fails to turn up anything useful. Anyone know what I need to do to resolve this?

In case it's relevant, my connection string looks like this:

User=SYSDBA;Password=[my password];Database=[db name];DataSource=localhost;Port=3050;Dialect=3;Charset=UTF8;

Once again, I know the server is working correctly because I can connect to it with FB Maestro. The problem is clearly in my .NET code somewhere. I just have no idea where!


Solution

  • The driver you use doesn't support srp256 and Firebird 4 server by default doesn't support anything else. You must edit firebird.conf changing AuthServer parameter to include srp plugin at least. Don't forget to restart the Firebird server afterward.