Global Data Management Forum

 View Only
  • 1.  Unable to connect to Informix DB using SSL from Informix.net.core.IfxConnection

    Posted Mon January 29, 2024 12:21 PM

    We have a .NET Core application that was written quite a while ago that targets .NET Core 3.1. It is using the Informix.net.core.dll package to connect to the Informix database. Everything works fine with the application as long as we use Protocol=onsoctcp. However we have the requirement to connect to the database using TLS 1.2. We understand that this support was added in ibm.csdk.4.50.FC10W1.WIN. We have upgraded the CSDK to use this version, which includes a new version of the Informix.net.core.dll dated 9/19/2023 with a File Version of 4.700.7.2021 and a Product Version of 3.1.6. 

    We changed our connection string to the following:

    Database=xxxx;Database Locale=en_us.57372;Host=xxx.xxx.xxx;Protocol=onsocssl;Password=xxxxxxxx;Server=xxxxxxxx;Service=50001;User ID=xxxxxxx;Pooling=false

    We don't receive any error, but the code just hangs on the Connecton Open. Never returns or throws an exception. We can connect to the database using an ODBC connection on the client machine, using protocol onsocssl. 

    We also tried using the System DSN in the connection string and we get the same behavior. Just hangs on the Open.

    Any help would be greatly appreciated. 

    Thanks,

    Loyd Vest 



    ------------------------------
    Loyd Vest
    ------------------------------


  • 2.  RE: Unable to connect to Informix DB using SSL from Informix.net.core.IfxConnection

    IBM Champion
    Posted Tue January 30, 2024 09:12 AM

    Hi Loyd,

    first of all, are you aware of Informix specific discussion forum which might be a better home for this question?

    Then to your question, since you didn't mention this:

    • what's the server version + platform?
    • is the server port at xxx.xxx.xxx:50001 an SSL port?
    • did you prepare the client side key store with the server's certificate? (I'd have to find out myself what it takes for .NET on Windows)


    ------------------------------
    Andreas Legner
    ------------------------------



  • 3.  RE: Unable to connect to Informix DB using SSL from Informix.net.core.IfxConnection

    Posted Tue January 30, 2024 09:36 AM

    Thanks for your Reply Andreas. No I wasn't aware of the Informix specific discussion forum.

    To answer your specific questions. We are connecting to an Avaya CMS system, which I believe is Informix 14.x and is running on some flavor of Linux, but I don't know that for sure. We do not have access to that system, other than via the Client Database Connection. The client side is Windows Server 2022, and the Application runs as a Windows Service. it is a .NET Core application targeting .NET Core 3.1. It is using the Informix.Net.Core.dll for the IfxConnection.  

    Yes, the server port is an SSL port. As I mentioned, we are able to set up an ODBC connection to that server and port using the onsocssl protocol. 

    Yes, the server certificates were imported to the Trusted Root Certificates on the Windows Server machine. Are you saying that we have to create a separate Keystore file for this application? 

    I really appreciate your help on this.

    Thanks,



    ------------------------------
    Loyd Vest
    ------------------------------



  • 4.  RE: Unable to connect to Informix DB using SSL from Informix.net.core.IfxConnection

    Posted Tue January 30, 2024 10:19 AM

    We figured out the issue. We were running the Windows Service under the Local Service account, which didn't have the needed permissions. We changed the service to run under an AD account that has elevated privileges, and it fixed the issue. 

    Thanks for your help with this issue. 



    ------------------------------
    Loyd Vest
    ------------------------------