Hi
I am using an Embedded Event Store for testing. I ran into an authentication issue that I am hopping you can help me resolve:
I start Event Store node like so
ClusterVNode node = EmbeddedVNodeBuilder.AsSingleNode()
.OnDefaultEndpoints()
.RunInMemory()
.RunProjections(ProjectionsMode.All);
node.Start();
then I create connection to it on status change:
var settings = ConnectionSettings.Create();
settings.SetDefaultUserCredentials(new UserCredentials(“admin”, “changeit”));
settings.FailOnNoServerResponse().EnableVerboseLogging().UseConsoleLogger();
var connection = EmbeddedEventStoreConnection.Create(node, settings, “TestConnection”);
await connection.ConnectAsync();
Then I right an event to it:
IList events = new List();
events.Add(new EventData(Guid.NewGuid(), “test”, true, Encoding.UTF8.GetBytes("{“foo” : ‘bar’}"), new byte[0]));
await connection.AppendToStreamAsync(Stream, ExpectedVersion.Any, events, userCredentials);
This fails with authentication error:
If I connect to Event Store running from command line following function works fine. Is Embedded node using same default Authentication userid and password
and if not how can I tell Embedded node which UserId and Password to authenticate with?
await connection.AppendToStreamAsync(Stream, ExpectedVersion.Any, events, userCredentials);
Thanks,
Vitaly.