https://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx
The ASP.NET IIS Registration tool (Aspnet_regiis.exe) is used to register ASP.NET applications with Internet Information Services (IIS).
This topic describes the options, syntax, and other information for using the tool.
获取授权
-pa container account
aspnet_regiis.exe -pa "NetFrameworkConfigurationKey" "NT AuthorityNetwork Service"
Grants permission for the specified user or group account to access the specified key container. This option can take the following modifiers:
-
-pku Substitutes a user-specified container for the default machine container.
-
-csp provider Specifies the container provider to use.
-
-full Specifies that full access should be added (by default, access is read-only).
加密 需要管理员权限运行
-pef section webApplicationDirectory
Encrypts the specified configuration section of the Web.config file in the specified physical (not virtual) directory.
Example
aspnet_regiis.exe -pef "connectionStrings" .
解密
-pdf sectionwebApplicationDirectory
Decrypts the specified configuration section of the Web.config file in the specified physical (not virtual) directory.