Hi,
The proposed solutions did not work for me. Any ideas ?
Please see screenshot.
I am trying to connect to a Synapse SQL Dedicated Pool with visual code studio
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I've an application that uses WebAPI in .Net core 6 and uses Kestrel server. When calling HttpPost request, the code tries to inject data in DB but fails with error:
The certificate chain was issued by an authority that is not trusted.
Inner exception: A connection was successfully established with the server, but then an error occurred during the login process
The obvious resolution is to inject TrustServerCertificate=True in the connection string. But this is a security risk as it can trust invalid certificate.
I'm using Dapper package to communicate with Sql server database.
After investigation, I found that this happens when I refer Microsoft.Data.SqlClient package. If I replace with System.Data.SqlClient package, above error occurs no more and I don't have to inject TrustServerCertificate flag.
1) Can anyone let me know why this error is raised when I refer Microsoft.Data.SqlClient?
2) Which package (System.Data.SqlClient or Microsoft.Data.SqlClient) is recommended for the new development (i.e. .Net 6 and Kestrel)
Thanks,
Amit
Hi,
The proposed solutions did not work for me. Any ideas ?
Please see screenshot.
I am trying to connect to a Synapse SQL Dedicated Pool with visual code studio
I has the same problem, with this solution !now work!. Thanks
Hello
I have a problem when I try to generate the dbContext classes in ASP .NET Core Web API, I try many solutions, but I have not succeeded yet, does anyone know any guide to help me solve it.
I am facing a similar situation on my Business IT Solutions website server. If the Web API is accessed from a different domain, ensure that CORS settings are configured to allow requests from the client application's domain.
This Connection string works well. you check your connection string similar to following example
Example: 1
Server=YourSystemName\SQLEXPRESS;Database=YourDb;Integrated Security=True;Trusted_Connection=True;TrustServerCertificate=True
Example: 2
Server=YourSqlInstance;Database=YourDb;Integrated Security=True;Trusted_Connection=True;TrustServerCertificate=True
Example: 3 (if in appsettings.json use double slash "\")
Server=YourSystemName\SQLEXPRESS;Database=YourDb;Integrated Security=True;Trusted_Connection=True;TrustServerCertificate=True