Does Firebird ADO.NET 4.10.0.0 provide a data provider with Firebird 3.0?

I am currently trying to connect an ASP.net 4.5 project to the recently released Firebird 3.0.

I am using Visual Studio 2015 Community Edition, Firebird 3 (64 bit) and used NuGet to get ADO.NET 4.10.0.0.

However, when I try to connect, I get an exception from the following message:

this.connect.ServerVersion threw an exception of type "System.InvalidOperationException"

Some other messages I receive:

Message: "Connection closed"
Source: FirebirdSQL.Data.Fierbird.Client
Stacktrace:
in FirebirdSql.Data.FirebirdClient.FbConnection.get_ServerVersion () in C: \ Users \ Jiri \ Documents \ devel \ NETProvider \ working \ NETProvider \ src \ FirebirdSql.Data.FirebirdClient \ FirebirdClient \ FbConnection.cs: line 7

IBExpert connects without problems.

This environment previously worked with Firebird 2.5 and older ADO.Net

It’s best to guess now that it is not supported, but my research on the Internet was inconclusive (from what I could find, there were signs that it was tested with Firebird 3 RC1)

If someone can point me in the right direction for this to happen, that would be awesome.

Thanks in advance!

+3
source share
1 answer

I answer this on the assumption that you installed Firebird 3 and did not change any of its configuration. By default, a Firebird 3 installation will have some strict security settings:

  • It will only support the new SRP authentication model.
  • This will require encryption of the wired protocol.

This means that drivers (for example, the 4b Firebird.NET provider) that do not yet support the SRP authentication model and the encryption of the wired protocol will not be able to connect out of the box.

To be able to connect, you will need to do the following

  • Enable Legacy Authentication Model
  • Reduce the encryption setting of the wired protocol from required to enabled
  • Create a user in the old authentication model

These steps require changes to firebird.conf . If you installed Firebird in Program Files , you need to make sure that your editor works as an administrator to save the changes.

Enable Legacy Authentication

To enable legacy authentication, you need to edit or add the following line to firebird.conf : (note that lines with the # prefix are comments!)

 AuthServer = Srp, Legacy_Auth 

Wired Transmission Protocol Encryption

To lower the encryption setting of the wired protocol, you need to edit or add the following line to firebird.conf :

 WireCrypt = Enabled 

Create Legacy Authentication User

To create a user in the old authentication model, you need to enable the legacy usermanager plugin by editing or adding the following line to firebird.conf :

 UserManager = Srp, Legacy_UserManager 

After the above changes, restart Firebird, connect to (any) Firebird 3 database using your favorite database management tool using SYSDBA or another administrator account and create a user using Legacy_UserManager with CREATE USER (replace the legacy username and password with the appropriate values ):

 CREATE USER legacy PASSWORD 'legacy' USING PLUGIN Legacy_UserManager 

Be sure to commit, otherwise the user will not be created.

Now you can connect to C # using the newly created user.

This is also described in Firebird 3 Release Notes, chapter 12 Compatibility Issues, Legacy Authentication .

The use of gsec or the functionality of services to create users is deprecated. If you still want to use any of them to create users in the old authentication model, you need to edit firebird.conf and put Legacy_UserManager first in the list.

Support in the .NET Firebird provider version 5.0.0.0 and higher

Please note that the Firebird.NET provider version 5.0.0.0 added support for SRP (without encryption of the wired protocol). Therefore, from the Firebird.NET provider version 5, you can use the new authentication model. Just make sure you downgrade the wire protocol encryption (setting WireCrypt ) from Required (default) to Enabled , as described above.

+8
source

All Articles