accessing mssql instance from another module

Omar Navarro 326 Reputation points
2022-08-03T13:15:11.42+00:00

When attempting to access a SQL container instance from a .NET 6 application the following error occurs. Both containers are initialized by a deployment manifest json.

sql docker container remote certificate was rejected by the provided RemoteCertificateValidationCallback  
Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
534 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,369 questions
{count} vote

Accepted answer
  1. QuantumCache 20,031 Reputation points
    2022-10-12T07:04:58.507+00:00

    Hello Omar,

    As suggested by Sander in his response, we tested the Sql container to see if it's running and it is as expected.

     "createOptions": "{\"Env\":[\"ACCEPT_EULA=Y\",\"MSSQL_SA_PASSWORD=StrongPassw0rd\"],\"HostConfig\":{\"Mounts\":[{\"Target\":\"/var/opt/mssql\",\"Source\":\"sqlVolume\",\"Type\":\"volume\"}],\"PortBindings\":{\"1433/tcp\":[{\"HostPort\":\"1401\"}]}}}"  
    

    Could you please let us know if the same setup worked on your side?

    249469-image.png

    Please check the SQL server module image container being used, along with the SQL Server version which is supported on the Host OS.

    249535-image.png

    249593-image.png

    Some other observation: thought it might be useful to add here
    One thing which i observed is the Image pull URL, looks like we are not able to pull the right URL which is generated from the VS Code templates.

    ![249480-image.png]5

    So better edit or fix the image pull URL as shown in the below image:

    249621-image.png

    Similar Ref

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Sander van de Velde 28,311 Reputation points MVP
    2022-08-03T15:24:58.337+00:00

    Hello @Omar Navarro ,

    which Sql container are you using? How did you config the related create options?

    Are you following some kind of tutorial?

    I recommend testing first for the Sql container to see if it's running as expected.

    In the past, I used "Microsoft Command Line Utilities 14.0 for SQL Server" to test the connection.

    0 comments No comments