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

**URL:** <https://discuss.elastic.co/t/set-up-elastic-search-on-azure-and-post-data-using-c-net-core/225808>\
**Category:** Elasticsearch\
**Created:** [March 31, 2020, 7:39am UTC](https://discuss.elastic.co/t/set-up-elastic-search-on-azure-and-post-data-using-c-net-core/225808 "2020-03-31T07:39:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ManishNarula](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@ManishNarula](https://discuss.elastic.co/u/ManishNarula)\
**Post date:** [March 31, 2020, 7:39am UTC](https://discuss.elastic.co/t/set-up-elastic-search-on-azure-and-post-data-using-c-net-core/225808/1 "2020-03-31T07:39:09Z")

</div>

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](https://us1.discourse-cdn.com/elastic/original/3X/1/7/170f335bf6bd790171d71b3bef503f3d4ab530bc.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/c/7c1685ea635413ff0ae9c8193147399bb5eab825.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/8/886ac4a150730d271451eb7682b6d2053113b178.png)

var pool = new SingleNodeConnectionPool(new Uri("[http://xx.xx.xx.xx:9200](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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 28, 2020, 7:39am UTC](https://discuss.elastic.co/t/set-up-elastic-search-on-azure-and-post-data-using-c-net-core/225808/2 "2020-04-28T07:39:10Z")

</div>

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