IIS7Register failed with HRESULT 800700b7: '文件已存在时,无法创建该文件

一、环境window server 2008R2环境下,.net framework 4.0, IIS7.5

二、部署完网站报错,浏览器访问报错

HTTP 错误 500.21 - Internal Server Error

处理程序“RequestHandlerFactory”在其模块列表中有一个错误模块“ManagedPipelineHandler”

三、Iis注册失败,日志文件显示报错信息为IIS7Register failed with HRESULT 800700b7: '文件已存在时,无法创建该文件

报错截图:01

日志报错截图:01

IIS7Register failed with HRESULT 800700b7: '当文件已存在时,无法创建该文件。

四、解决方案:

  1. 打开目录找到

C:\Windows\System32\inetsrv\config\applicationHost.config 文件

  1. 把<globalModules> 节点下面的%windir%替换为:c:\windows
        <globalModules>

            <add name="UriCacheModule" image="%windir%\System32\inetsrv\cachuri.dll" />

            <add name="FileCacheModule" image="%windir%\System32\inetsrv\cachfile.dll" />

            <add name="TokenCacheModule" image="%windir%\System32\inetsrv\cachtokn.dll" />

            <add name="HttpCacheModule" image="%windir%\System32\inetsrv\cachhttp.dll" />

            <add name="StaticCompressionModule" image="%windir%\System32\inetsrv\compstat.dll" />

            <add name="DefaultDocumentModule" image="%windir%\System32\inetsrv\defdoc.dll" />

            <add name="DirectoryListingModule" image="%windir%\System32\inetsrv\dirlist.dll" />

            <add name="ProtocolSupportModule" image="%windir%\System32\inetsrv\protsup.dll" />

            <add name="HttpRedirectionModule" image="%windir%\System32\inetsrv\redirect.dll" />

            <add name="ServerSideIncludeModule" image="%windir%\System32\inetsrv\iis_ssi.dll" />

            <add name="StaticFileModule" image="%windir%\System32\inetsrv\static.dll" />

            <add name="AnonymousAuthenticationModule" image="%windir%\System32\inetsrv\authanon.dll" />

            <add name="CertificateMappingAuthenticationModule" image="%windir%\System32\inetsrv\authcert.dll" />

            <add name="UrlAuthorizationModule" image="%windir%\System32\inetsrv\urlauthz.dll" />

            <add name="BasicAuthenticationModule" image="%windir%\System32\inetsrv\authbas.dll" />

            <add name="WindowsAuthenticationModule" image="%windir%\System32\inetsrv\authsspi.dll" />

            <add name="DigestAuthenticationModule" image="%windir%\System32\inetsrv\authmd5.dll" />

            <add name="IISCertificateMappingAuthenticationModule" image="%windir%\System32\inetsrv\authmap.dll" />

            <add name="IpRestrictionModule" image="%windir%\System32\inetsrv\iprestr.dll" />

            <add name="RequestFilteringModule" image="%windir%\System32\inetsrv\modrqflt.dll" />

            <add name="CustomLoggingModule" image="%windir%\System32\inetsrv\logcust.dll" />

            <add name="CustomErrorModule" image="%windir%\System32\inetsrv\custerr.dll" />

            <add name="HttpLoggingModule" image="%windir%\System32\inetsrv\loghttp.dll" />

            <add name="TracingModule" image="%windir%\System32\inetsrv\iisetw.dll" />

            <add name="FailedRequestsTracingModule" image="%windir%\System32\inetsrv\iisfreb.dll" />

            <add name="RequestMonitorModule" image="%windir%\System32\inetsrv\iisreqs.dll" />

            <add name="IsapiModule" image="%windir%\System32\inetsrv\isapi.dll" />

            <add name="IsapiFilterModule" image="%windir%\System32\inetsrv\filter.dll" />

            <add name="CgiModule" image="%windir%\System32\inetsrv\cgi.dll" />

            <add name="FastCgiModule" image="%windir%\System32\inetsrv\iisfcgi.dll" />

            <add name="WebDAVModule" image="%windir%\System32\inetsrv\webdav.dll" />

            <add name="ConfigurationValidationModule" image="%windir%\System32\inetsrv\validcfg.dll" />

            <add name="ManagedEngine64" image="%windir%\Microsoft.NET\Framework64\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness64" />

            <add name="ManagedEngine" image="%windir%\Microsoft.NET\Framework\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness32" />

            <add name="WSMan" image="%windir%\system32\wsmsvc.dll" />

        </globalModules>

这个因为对应的ASPNET_REGIIS.EXE不接受的环境变量扩展到Windows目录的原因

修改后:

<globalModules>

            <add name="UriCacheModule" image="c:\windows\System32\inetsrv\cachuri.dll" />

            <add name="FileCacheModule" image="c:\windows\System32\inetsrv\cachfile.dll" />

            <add name="TokenCacheModule" image="c:\windows\System32\inetsrv\cachtokn.dll" />

            <add name="HttpCacheModule" image="c:\windows\System32\inetsrv\cachhttp.dll" />

            <add name="StaticCompressionModule" image="c:\windows\System32\inetsrv\compstat.dll" />

            <add name="DefaultDocumentModule" image="c:\windows\System32\inetsrv\defdoc.dll" />

            <add name="DirectoryListingModule" image="c:\windows\System32\inetsrv\dirlist.dll" />

            <add name="ProtocolSupportModule" image="c:\windows\System32\inetsrv\protsup.dll" />

            <add name="HttpRedirectionModule" image="c:\windows\System32\inetsrv\redirect.dll" />

            <add name="ServerSideIncludeModule" image="c:\windows\System32\inetsrv\iis_ssi.dll" />

            <add name="StaticFileModule" image="c:\windows\System32\inetsrv\static.dll" />

            <add name="AnonymousAuthenticationModule" image="c:\windows\System32\inetsrv\authanon.dll" />

            <add name="CertificateMappingAuthenticationModule" image="c:\windows\System32\inetsrv\authcert.dll" />

            <add name="UrlAuthorizationModule" image="c:\windows\System32\inetsrv\urlauthz.dll" />

            <add name="BasicAuthenticationModule" image="c:\windows\System32\inetsrv\authbas.dll" />

            <add name="WindowsAuthenticationModule" image="c:\windows\System32\inetsrv\authsspi.dll" />

            <add name="DigestAuthenticationModule" image="c:\windows\System32\inetsrv\authmd5.dll" />

            <add name="IISCertificateMappingAuthenticationModule" image="c:\windows\System32\inetsrv\authmap.dll" />

            <add name="IpRestrictionModule" image="c:\windows\System32\inetsrv\iprestr.dll" />

            <add name="RequestFilteringModule" image="c:\windows\System32\inetsrv\modrqflt.dll" />

            <add name="CustomLoggingModule" image="c:\windows\System32\inetsrv\logcust.dll" />

            <add name="CustomErrorModule" image="c:\windows\System32\inetsrv\custerr.dll" />

            <add name="HttpLoggingModule" image="c:\windows\System32\inetsrv\loghttp.dll" />

            <add name="TracingModule" image="c:\windows\System32\inetsrv\iisetw.dll" />

            <add name="FailedRequestsTracingModule" image="c:\windows\System32\inetsrv\iisfreb.dll" />

            <add name="RequestMonitorModule" image="c:\windows\System32\inetsrv\iisreqs.dll" />

            <add name="IsapiModule" image="c:\windows\System32\inetsrv\isapi.dll" />

            <add name="IsapiFilterModule" image="c:\windows\System32\inetsrv\filter.dll" />

            <add name="CgiModule" image="c:\windows\System32\inetsrv\cgi.dll" />

            <add name="FastCgiModule" image="c:\windows\System32\inetsrv\iisfcgi.dll" />

            <add name="WebDAVModule" image="c:\windows\System32\inetsrv\webdav.dll" />

            <add name="ConfigurationValidationModule" image="c:\windows\System32\inetsrv\validcfg.dll" />

            <add name="ManagedEngine64" image="c:\windows\Microsoft.NET\Framework64\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness64" />

            <add name="ManagedEngine" image="c:\windows\Microsoft.NET\Framework\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness32" />

            <add name="WSMan" image="c:\windows\system32\wsmsvc.dll" />

        </globalModules>

 

五、重新注册到iis

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i –enable

重新访问网站 问题解决

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值