# Using NEST with https and TLS 1.2?

**URL:** <https://discuss.elastic.co/t/using-nest-with-https-and-tls-1-2/79105>\
**Category:** Elasticsearch\
**Created:** [March 18, 2017, 12:32am UTC](https://discuss.elastic.co/t/using-nest-with-https-and-tls-1-2/79105 "2017-03-18T00:32:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![agonzalez](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@agonzalez](https://discuss.elastic.co/u/agonzalez)\
**Post date:** [March 18, 2017, 12:32am UTC](https://discuss.elastic.co/t/using-nest-with-https-and-tls-1-2/79105/1 "2017-03-18T00:32:04Z")

</div>

I dont see any sample of using NEST with https. How can I encrypt data using NEST if i use https instead of http like this i get error:

var node = new Uri("[https://myserver:9200](https://myserver:9200)");  
var settings = new ConnectionSettings(node);  
var client = new ElasticClient(settings);

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [March 18, 2017, 4:39am UTC](https://discuss.elastic.co/t/using-nest-with-https-and-tls-1-2/79105/2 "2017-03-18T04:39:58Z")

</div>

What error do you get? Can you provide

- A stack trace
- The `DebugInformation` from a response (also set `.DisableDirectStreaming()` on `ConnectionSettings` to gather more information).

Are you using a self-signed certificate or a certificate issued by a CA?

---

<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 15, 2017, 4:40am UTC](https://discuss.elastic.co/t/using-nest-with-https-and-tls-1-2/79105/3 "2017-04-15T04:40:09Z")

</div>

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