0x80090005报错的问题, 两台服务器共享磁盘网络驱动器模式,另附IIS7备份的批处理文件
[ 2016-10-21 17:05:58 | 作者: admin ]
中间一直因为这样,那样的权限问题而导致失败,最后经下面操作成功解决!
两台服务器,全为08R2,IIS7,备份完A机,在B机还原后不能给网站分配用户名和密码,分配完没办法保存,网上搜半天不得要领,后在一MSDN上找到,原来还要备份A机的密钥,才可以。(http://blogs.msdn.com/b/vijaysk/archive/2009/03/14/caution-while-xcopying-iis-7-0-config-files.aspx)
There was an error while performing this operation.
Details: Bad Data. (Exception from HRESULT: 0x80090005)
详细信息:错误的数据。(异常来自HRESULT:0x80090005)
or the encryption it uses machine specific keys in the iisConfiguration and iisWasKey containers. When the applicationHost.config is moved to a different server IIS can no longer decrypt the settings.
To get this working you can export and import the keys from the original server.
Export using the following commands
IIS使用了加密密钥,当applicationHost.config移到不同的服务器时,由于密钥不同,IIS就没办法再解密了,解决的办法是从原始服务器上备份密钥,再在这台服务器上还原,备份方法:
aspnet_regiis(这个程序一般在.NET的安装目录下,自己用DIR命令查看一下)
aspnet_regiis -px "iisConfigurationKey" "D:\iisConfigurationKey.xml" -pri
aspnet_regiis -px "iisWasKey" "D:\iisWasKey.xml" -pri
接着把两个文件拷到B服务器上,再导入,导入的命令参数为:
aspnet_regiis -pi "iisConfigurationKey" "D:\iisConfigurationKey.xml"
aspnet_regiis -pi "iisWasKey" "D:\iisWasKey.xml"
一般就可以合用了!
另附IIS7备份的批处理文件:
评论Feed: http://blog.xg98.com/feed.asp?q=comment&id=2355
两台服务器,全为08R2,IIS7,备份完A机,在B机还原后不能给网站分配用户名和密码,分配完没办法保存,网上搜半天不得要领,后在一MSDN上找到,原来还要备份A机的密钥,才可以。(http://blogs.msdn.com/b/vijaysk/archive/2009/03/14/caution-while-xcopying-iis-7-0-config-files.aspx)
There was an error while performing this operation.
Details: Bad Data. (Exception from HRESULT: 0x80090005)
详细信息:错误的数据。(异常来自HRESULT:0x80090005)
or the encryption it uses machine specific keys in the iisConfiguration and iisWasKey containers. When the applicationHost.config is moved to a different server IIS can no longer decrypt the settings.
To get this working you can export and import the keys from the original server.
Export using the following commands
IIS使用了加密密钥,当applicationHost.config移到不同的服务器时,由于密钥不同,IIS就没办法再解密了,解决的办法是从原始服务器上备份密钥,再在这台服务器上还原,备份方法:
aspnet_regiis(这个程序一般在.NET的安装目录下,自己用DIR命令查看一下)
aspnet_regiis -px "iisConfigurationKey" "D:\iisConfigurationKey.xml" -pri
aspnet_regiis -px "iisWasKey" "D:\iisWasKey.xml" -pri
接着把两个文件拷到B服务器上,再导入,导入的命令参数为:
aspnet_regiis -pi "iisConfigurationKey" "D:\iisConfigurationKey.xml"
aspnet_regiis -pi "iisWasKey" "D:\iisWasKey.xml"
一般就可以合用了!
另附IIS7备份的批处理文件:
c:
@echo off
:loop
cls
set /p input=请选择:1为备份 2为恢复:
if %input%==1 (
RD /s /q d:\IIS7备份\备份
cd %windir%\System32\inetsrv\
Appcmd.exe
appcmd add backup "备份"
Xcopy %windir%\System32\inetsrv\backup /s d:\IIS7备份
RD /s /q %windir%\System32\inetsrv\backup\备份
pause
exit
)
if %input%==2 (
Xcopy d:\IIS7备份 /s C:\Windows\System32\inetsrv\backup
cd C:\Windows\System32\inetsrv\
Appcmd.exe
appcmd restore backup "备份"
RD /s /q C:\Windows\System32\inetsrv\backup\备份
exit
)
goto loop
@echo off
:loop
cls
set /p input=请选择:1为备份 2为恢复:
if %input%==1 (
RD /s /q d:\IIS7备份\备份
cd %windir%\System32\inetsrv\
Appcmd.exe
appcmd add backup "备份"
Xcopy %windir%\System32\inetsrv\backup /s d:\IIS7备份
RD /s /q %windir%\System32\inetsrv\backup\备份
pause
exit
)
if %input%==2 (
Xcopy d:\IIS7备份 /s C:\Windows\System32\inetsrv\backup
cd C:\Windows\System32\inetsrv\
Appcmd.exe
appcmd restore backup "备份"
RD /s /q C:\Windows\System32\inetsrv\backup\备份
exit
)
goto loop
[最后修改由 admin, 于 2016-10-21 17:08:11]

这篇日志没有评论。
此日志不可发表评论。