我在用pb11.5做web发布过程中遇到这类错误,使用了这个修复工具搞定了,比较不错!
源码:
@echo offecho *echo *echo ****************************************************echo * *echo * IIS Server Application Error错误自动修复批处理 *echo * 作者:hayden *echo * *echo ****************************************************echo *echo *set /p isok0=开始IIS修复?(y/n)if %isok0%==y goto begingoto forend:beginset userIWAM=IWAM_%COMPUTERNAME%set userIUSR=IUSR_%COMPUTERNAME%:checkIWAMnet user %userIWAM%if %errorlevel%==0 goto checkIUSRgoto netuserIWAM:checkIUSRnet user %userIUSR%if %errorlevel%==0 goto editusergoto netuserIUSR:netuserIWAMnet userset /p tiwam=请输入正确的“启动 IIS 进程帐户”名称(即以IWAM_开头的帐户名称)?set userIWAM=%ans%goto checkIWAM:netuserIUSRnet userset /p tiusr=请输入正确的“Internet 来宾帐户”名称(即以IUSR_开头的帐户名称)?set userIUSR=%tiusr%goto checkIUSR:edituserecho 重置“启动 IIS 进程帐户”密码为123net user %userIWAM% 123echo 重置“Internet 来宾帐户”密码为123net user %userIUSR% 123echo 密码同步cscript.exe %HOMEDRIVE%InetpubAdminscriptsadsutil.vbs set w3svc/wamuserpass 123cscript.exe %HOMEDRIVE%InetpubAdminscriptsadsutil.vbs set w3svc/anonymoususerpass 123echo *echo *set /p isok1=请测试IIS是否正常?(y/n)if %isok1%==y goto forendcscript.exe %HOMEDRIVE%InetpubAdminscriptssynciwam.vbs -viisresetecho *echo *set /p isok2=请测试IIS是否正常?(y/n)if %isok2%==y goto forendecho 清除MSDTC服务注册表相关信息reg delete HKLMSYSTEMCurrentControlSetServicesMSDTC /freg delete HKLMSOFTWAREMicrosoftMSDTC /freg delete HKCRCID /fecho 停止并重新安装MSDTC服务net stop msdtcmsdtc -uninstallmsdtc -installecho 重置“启动 IIS 进程帐户”与“Internet 来宾帐户”密码net user %userIWAM% 123net user %userIUSR% 123echo 同步IIS metabase中IWAM_MYSERVER的密码%HOMEDRIVE%InetpubAdminscriptsadsutil.vbs set w3svc/wamuserpass "123"echo 同步COM+应用程序所用的IWAM_MYSERVER密码cscript.exe %HOMEDRIVE%InetpubAdminscriptssynciwam.vbs -vecho *echo *set /p isok3=请测试IIS是否正常?(y/n)if %isok3%==y goto forendecho 重新注册相关组件rundll32 %windir%system32inetsrvwamreg.dll, CreateIISPackageregsvr32 %windir%system32inetsrvasptxn.dll /secho *echo *set /p isok4=请测试IIS是否正常?(y/n)if %isok4%==y goto forendecho *echo *echo 如果IIS还不正常的话,我真的解决不了唉,请另请高明吧!:forendecho *echo *@echo 批处理执行完毕,请按任意键退出?@echo offpause