> For the complete documentation index, see [llms.txt](https://docs.ngsurvey.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ngsurvey.com/data-encryption/encryption-setup/transparent-encryption/iis-encryption-setup.md).

# IIS Encryption Setup

If you're using IIS to host your on-premise version you may setup the variable in the IIS configuration editor as shown below or as a more secure alternative you may also use an [Azure key vault](https://azure.microsoft.com/en-us/services/key-vault/) to store your key.&#x20;

{% hint style="info" %}
While you could also store the key in directly the web.config file we would recommend not using that approach and set the environment variables either at your host level or using the IIS configuration editor as shown below. &#x20;
{% endhint %}

\
Open IIS administration interface and go to your site settings page.&#x20;

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MI2L3vOQym3T_0iJyoW%2F-MI2MsV49K6Ywqx3Zds5%2Fimage.png?alt=media\&token=4bc011bc-8ff4-403a-93a0-2f4b65693a48)

From within the configuration editor select the environmentVariables option

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MI2L3vOQym3T_0iJyoW%2F-MI2ODkfXyjPLj76fAiD%2Fimage.png?alt=media\&token=28f0d517-0f72-459e-b04d-3bc308ab169c)

From there you can enter the key that will be used for encryption / decryption.

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MI2L3vOQym3T_0iJyoW%2F-MI2LoUJpJ8k3uUaNFok%2Fimage.png?alt=media\&token=c18c57ea-7676-4e6a-b6ed-d7d7c2e98578)

## 🔐 IIS / Azure key vault

To use an Azure key vault to host and store your ngSurvey settings and keys you may set following environment variables on your server.

* **KeyVault:Name** is the name of your Key vault
* **AzureAd:ClientId** is the client id to access your Key vault
* **AzureAd:ClientSecret** is the client secret to access your key vault


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ngsurvey.com/data-encryption/encryption-setup/transparent-encryption/iis-encryption-setup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
