更改IIS .config密码(encryption?)

之前用于login到允许我们的网站运行的configuration文件的帐户已被删除。 我绝对没有IIS的知识,并正在寻找一些如何encryption我的密码,像以前的用户了解。 我相信这是encryptiontypes<add name="IISWASOnlyRsaProvider..." 。 后来在代码中,我提供了自己的用户名和密码,允许它再次运行:

 virtualDirectory path="/" physicalPath="C:\path\to" userName="" password="" /> <virtualDirectory path="/Pictures" physicalPath="C:\Shares\Public\pictures" userName="" password="" /> 

以前的密码以enc:AesProvider ,后面跟着encryption的密码。 有没有办法生成我自己的encryption密码放置在上述位置?

在IISpipe理器中打开虚拟目录,单击右侧“操作”窗格中的“ Advanced Settings... ”。 在条目Physical Path Credentials单击...button并设置用户和密码。 它将被存储在configuration文件中。

请注意,虽然密码本身的encryptionfunction很强大,但机器上的每个pipe理员都可以很容易地查看密码。

Default Web Site根目录中的vDir foo示例:

 Get-WebConfiguration -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.applicationHost/sites/site[@name='Default Web Site']/application[@Path='/']/virtualDirectory[@path='/foo']" | select username, password 

这使用了IIS用来从configuration中获取用户名和密码的相同API。 在configuration中,密码是encryption的,当通过API读取时,它以明文forms出现。

您可以使用aspnet_regiis.exe命令对configuration文件的必需部分进行encryption,并授予对需要读取的帐户的访问权限。

http://blogs.msdn.com/b/gaurav/archive/2013/12/16/encrypting-section-of-config-file-using-aspnet-regiis-exe-the-configuration-for-physical-path-networkingconfiguration,不能待opened.aspx