Click here to Skip to main content
15,883,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When i try to execute the db query from my asp.net core 3.1 (running under windows docker container) am getting the error as

The instance of SQL Server you attempted to connect to requires encryption but this machine does not support it.


same is working fine when running in IIExpress

What I have tried:

i have tried different connection string format

Server=tcp:xxxxxxx.windows.net,1433;Initial Catalog=xxxxx;Persist Security Info=False;User ID=xxxxx;Password=xxx;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;

Server=tcp:xxxxxxx.windows.net,1433;Initial Catalog=xxxxx;Persist Security Info=False;User ID=xxxxx;Password=xxx;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;

Server=tcp:xxxxxxx.windows.net,1433;Initial Catalog=xxxxx;Persist Security Info=False;User ID=xxxxx;Password=xxx;Connection Timeout=30;

Server=tcp:xxxxxxx.windows.net;Initial Catalog=xxxxx;Persist Security Info=False;User ID=xxxxx;Password=xxx;Connection Timeout=30;

Server=<ipaddress>,1433;Initial Catalog=xxxxx;Persist Security Info=False;User ID=xxxxx;Password=xxx;Connection Timeout=30;


but nothing is worked.
Posted
Updated 19-Feb-20 1:32am

1 solution

Looks like this is going to be more of a configuration issue than a programming problem; I would review the following resources as well as you have any keys stored propery

Security Overview - Azure SQL Database | Microsoft Docs[^]
Connect and Query quickstarts - Azure SQL Database | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900