Closed rgfaber closed 4 months ago
Hi @rgfaber
The connection string you are using has insecure=true
which is not a valid option for the client, this is instead something you configure on the server (not to be confused with the ConnectivitySettings.Insecure
boolean which is a reflection of the tls
flag on the connection string).
I took a look at your dot-cart repo and I can see you don't parse the connection string but rather use your own custom type to wrap some ESDB connection string properties and then manually construct the client settings, which is how you were able to construct the object in your screenshot that has Address = esdb://localhost:2113/?insecure=true&tls=false&tlsVerifyCert=false
.
The reason for the exception is that, in your dot-cart repo, you configure the client ConnectivitySettings
by manually setting the address to the above, which means the client does not do the typical parsing it would of a connection string.
Because of this, both ConnectivitySettings.Insecure
and ConnectivitySettings.TlsVerifyCert
are initialised with their default values of true
, which means the client will attempt an SSL handshake with a server that has not been configured for TLS.
I would recommend that you utilise EventStoreClientSettings.Create to create your client settings before initialising the client.
Here are some samples that do this:
I hope this helps.
Thanks for the swift and detailed response, I will act accordingly.
EDIT:
Proof of Success:
Many thanks!
Description
Environment:
.NET 8
hosting v24.2.0-jammy in docker compose as described in the docs
using Nuget Packages
To Reproduce
Expected
Actual Behavior
Upon connecting:
Aditional context
secure-cluster with compose
did not give any errors.
Hope it helps and thanks for any guidance!