ASP网站部署https后生成提示msxml3.dll 错误 ‘800c0005’ 系统未找到指定的资源错误

ASP网站部署https证书后,网站后台生成提示msxml3.dll 错误 ‘800c0005’ 系统未找到指定的资源错误,经过检查分析是Microsoft.XMLHTTP控件请求https的问题,这个控件无法访问请求https的链接资源,导致生成出错。

ASP网站部署https后生成提示msxml3.dll 错误 ‘800c0005’ 系统未找到指定的资源错误

解决办法:

先把请求的URL修改回http,在服务器里面修改hosts文件,C:\Windows\System32\drivers\etc\hosts里面添加一行 127.0.0.1 blog.mydns.vip,然后在web.config里面添加以下规则,处理以后就能正常生成了。

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="301" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTPS}" pattern="^on$" negate="true" />
<add input="%{REMOTE_ADDR}&amp;%" pattern="127.0.0.1" negate="true" />
</conditions>
<action type="Redirect" url="https://blog.mydns.vip/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
<httpErrors errorMode="Custom" />
</system.webServer>
</configuration>

原理总结:

由于Microsoft.XMLHTTP控件无法请求https资源,网站又启用了并强制跳转到了https,所以导致生成时无法通过,修改hosts文件将生成请求全部指向服务器端本地,再通过web.config规则文件里面排除127.0.0.1的请求,达到即不影响生成,又不影响https访问网站的需求。

原文地址:https://blog.mydns.vip/2117.html

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-62778877-8261;邮箱:jenny@west.cn。本站原创内容未经允许不得转载,或转载时需注明出处::西部数码资讯门户 » ASP网站部署https后生成提示msxml3.dll 错误 ‘800c0005’ 系统未找到指定的资源错误

赞 (0)