Nel web.config ho specificato il tag
<identity impersonate="true" userName="xxx" password="xxx" />
vorrei non lasciare username e password in chiaro. cercando tra la documentazione Microsoft in linea, ho trovato che la soluzione al mio problema può essere l'utilizzo di aspnet_setreg.exe, che permette di crittografare il nome utente e la password e memorizzarli nel registro di sistema.
Lancio da shell il seguente comando:
aspnet_setreg -k:Software\MyASP.NET\Identity -u:xxx -p:xxx
A questo punto il testo ritornato dal comando è:
Nel visualizzare nel browser la mia applicazione, ottengo il seguente errore:Please edit your configuration to contain the following: userName="registry:HKLM\Software\MyASP.NET\Identit y\ASPNET_SETREG,userName" password="registry:HKLM\Software\MyASP.NET\Identit y\ASPNET_SETREG,password"
The DACL on the registry key grants Full Control to System, Administrators, and Creator Owner. If you have encrypted credentials for the <identity/> configuration section, or a connection string for the <sessionState/> configuration section, ensure that the process id entity has Read access to the registry key. Furthermore, if you have configured IIS to access content on a UNC share, the account used to access the share will need Read access to the registry key. Regedt32.exe may be used to view/modify registry key permissions. You may rename the registry subkey and registry value in order to prevent discov ery.
Credo proprio sia dovuto al fatto che (come detto sopra nel testo ritornato dal comando aspnet_setreg) il processo non può leggere il registro di sistema. Come faccio a concedere questo privilegio?Errore durante la lettura delle informazioni di configurazione dal Registro di sistema.

Rispondi quotando