I am creating an ASP.NET Core 6 MVC app.
I have two applications, a client application (ClientUI) that calls an API.
Both applications are running in Visual Studio 2022.
The API is connected to a SQL database, and in order to have access to the database, I have to open Visual Studio as different user and use a user and password generated by BeyondTrust.
Using those credentials I have access to the database.
When I do an HttpClient
call from the ClientUI to the API endpoint, I got this error
System.AggregateException: 'One or more errors occurred. (The SSL connection could not be established, see inner exception.)'
AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot
If a open Visual Studio with my credentials, I have no problem to connect to the endpoint (but is does not connect to the database).
My credentials are up to date. Those credentials are not available when I open Visual Studio with different user?
I read what it is said here, but I do not have a directory ASP.NET in this path C:\Users\{User}\AppData\Roaming\ASP.NET\Https