divyang4481
divyang4481

Reputation: 1783

.net 3.1 application running inside docker is failing to connect SQL server

I had one application running in .net core 2.2 and connecting to SQL server 2012. Now I have upgrade my .net core application to 3.1 and also upgraded EF core. After up-gradation this application fail to connect, while running inside docker container. but if I run same application in window machine then it gets connected successfully.

Upvotes: 1

Views: 1355

Answers (1)

divyang4481
divyang4481

Reputation: 1783

there is issue with security in docker container. this can be resolve by updating openssl.cnf inside docker

I have added following line in docker file

FROM base AS final
WORKDIR /app
RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf
RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /usr/lib/ssl/openssl.cnf

Upvotes: 2

Related Questions