1

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.

1 Answer 1

2

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
Sign up to request clarification or add additional context in comments.

3 Comments

If this resolved your issue, you should accept this an an answer. See stackoverflow.com/help/self-answer
@reggieboyYEAH Maybe you need to set minimum TLS protocol as well? From that same issue thread, check out the comment that has solved the problem for a lot of people: github.com/dotnet/SqlClient/issues/222#issuecomment-535941637

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.