> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/server/it/knowledge-base/how-to-articles/allow-devolutions-scheduler-to-read-encrypted-connection-strings.md).

# Consentire a Devolutions Scheduler di leggere le stringhe di connessione crittografate

### Utilizzo degli account di accesso di SQL Server

Quando si utilizzano gli account di accesso di SQL Server, è della massima importanza che il file di configurazione del server (**appsettings.json**) sia crittografato, poiché memorizza le stringhe di connessione del database. Queste includono l'HostName del server di database, il nome del database (Initial Catalogue) e le credenziali (User ID e Password).

Tuttavia, poiché la crittografia del file **appsettings.json** richiede l'utilizzo di ***RsaProtectedConfigurationProvider*** di .NET Framework, sono necessarie autorizzazioni aggiuntive per accedere al contenitore ***NetFrameworkConfigurationKey*** utilizzato da RSA Provider.

L'omissione di ottenere queste autorizzazioni impedisce l'avvio di ***DevolutionsSchedulerService*** e restituisce un messaggio di errore se l'opzione ***Disable connection string encryption*** è disabilitata in Devolutions Server Console (clic destro su un'istanza, quindi ***Edit –*** ***IIS** –* ***Disable connection string encryption***).

{% hint style="danger" %}
Concedere l'accesso al contenitore ***NetFrameworkConfigurationKey*** potrebbe rappresentare un problema di sicurezza, pertanto si consiglia di non concedere questa autorizzazione a ***Network Service*** o ***Local Service***.
{% endhint %}

Consigliamo di utilizzare un account dedicato per il servizio ***DevolutionsSchedulerService*** e di impostare il servizio affinché venga eseguito con tale account.

Quindi esegua il seguente comando da un prompt dei comandi con privilegi elevati:

```bash
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis" -pa "NetFrameworkConfigurationKey" "SchedSvcLocalAccount"
```

Dovrebbe restituire:

```
Microsoft (R) ASP.NET RegIIS version 4.0.30319.0
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation.  All rights reserved.
Adding ACL for access to the RSA Key container...
Succeeded!
```

### Utilizzo degli account di dominio di SQL Server (Integrated security)

Come per gli account di accesso, l'omissione di ottenere le autorizzazioni sul contenitore ***NetFrameworkConfigurationKey*** utilizzato da RSA Provider impedisce l'avvio di ***DevolutionsSchedulerService***, restituendo probabilmente questo errore dalla Console dei servizi di Windows.

L'account impostato su ***DevolutionsSchedulerService*** (indicato come account VaultDBScheduler nel Pre-Deployment Account Survey) richiederà l'autorizzazione per leggere il contenitore ***NetFrameworkConfigurationKey***.

Per ottenerle, esegua il seguente comando da un prompt dei comandi con privilegi elevati:

```
"C:\"Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis" -pa "NetFrameworkConfigurationKey" "<YourDomain>\<VaultDBSchedulerAccount>"
```

Dovrebbe restituire:

```
Microsoft (R) ASP.NET RegIIS version 4.0.30319.0
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation.  All rights reserved.
Adding ACL for access to the RSA Key container...
Succeeded!
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/server/it/knowledge-base/how-to-articles/allow-devolutions-scheduler-to-read-encrypted-connection-strings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
