Set up Elastic Search on Azure and post data using C# .net core

Hi there,

I am trying to set up Elastic Search on Azure.
Below are the steps i have taken

Transport Security is No , though screen shot is saying yes (old screen shot)

image
image
image

var pool = new SingleNodeConnectionPool(new Uri("http://xx.xx.xx.xx:9200"));

            var settings = new ConnectionSettings(pool).DefaultIndex("people1")
                // configure the client with authentication credentials
                .BasicAuthentication("xxx", "xxx");


            var client = new ElasticClient(settings);

            var person = new Person
            {
                Id = 1,
                FirstName = "Test",
                LastName = "Test"
            };
           
            var indexResponse = client.IndexDocument(person);

Error:
Could not authenticate with the specified node. Try verifying your credentials or check your Shield configuration.. Call: Status code 401 from: PUT /people1/_doc/1.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.