Solved: SqlException: A connection was successfully
established with the server, but then an error occurred during the login
process
https://youtu.be/0KdohO2UQXc
Asp.Net Einbinden
User Identity
.Net6 .Net 7
Beim Zugriff auf
eine SQL sErver Datenbank
Fehlermeldung beim
Login und beim Register
An
unhandled exception occurred while processing the request.
Win32Exception: Die Zertifikatkette wurde von einer
nicht vertrauenswürdigen Zertifizierungsstelle ausgestellt.
Unknown location
SqlException:
A connection was successfully established with the server, but then an error
occurred during the login process. (provider: SSL Provider,
error: 0 - Die Zertifikatkette wurde von einer nicht vertrauenswürdigen
Zertifizierungsstelle ausgestellt.)
Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, bool breakConnection, Action<Action> wrapCloseInAction)
|
Reason is: Microsoft changed from System.Data to
Microsoft.Data
System.Data.SqlClient to Microsoft.Data.SqlClient
Solution:
Add: ;
Encrypt=False to your Connectionstring
In you File: appsettings.json in asp.net core
.net7 .net6
"ConnectionStrings": {
"DefaultConnection": "Server=.\\sqlexpress;Database=MYDATABASE;Trusted_Connection=True;MultipleActiveResultSets=true;Encrypt=false"
},
|