RafalD
RafalD

Reputation: 3

Workaround for incompatible wire encryption levels in Firebird ado.net provider

I know that this question has been already asked and that one of the solutions is to change WireCrypt setting in config file. However, my application has to connect to third party software that is using Firebird 3.0 db thus I do not have the control over db configuration. The question is: Is there any workaround to connect to firebird db (with default wirecrypt setting) from .Net application using Firebird Ado.net provider?

EDIT: Edit with regard to Mark Rotteveel answer. I have tried this approach but I was not able to force the connection to be made via TCP instead I got the error:

Unable to complete network request to host \"xnet://Global\FIREBIRD\".

Connection string generated by the builder:

"server type=Embedded;initial catalog=C:\\foldername\\dbfile.ibb;data source=192.168.0.108;port number=3050;user id=****;password=****;client library=\"C:\\Program Files (x86)\\Firebird\\Firebird_3_0\\fbclient.dll\""

Upvotes: 0

Views: 1390

Answers (1)

Mark Rotteveel
Mark Rotteveel

Reputation: 108941

To be able to use wire encryption, you need to update to Firebird ADO.net provider version 7. Version 7 added support for wire encryption, see ADO.NET provider 7.0.0.0 for Firebird is ready for more information.

Old answer

Ideally, the server needs to be configured to WireCrypt = Enabled, as clients are not allowed to downgrade the security requirements of the server.

If that really is not an option, then you should try to use the embedded server option of the Firebird ado.net provider. As the embedded server uses a native Firebird client library, it can also be used to connect to a Firebird server, and using the Firebird 3 fbclient.dll should therefor allow you to connect. However, I'm not 100% sure if this actually works with Firebird ADO.net provider, so I will test this and create a more detailed write-up later.

I haven't managed to get a connection to a server through embedded, so it looks like you have no other option than to have the server config changed (WireCrypt = Enabled).

Upvotes: 0

Related Questions