前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >测试windows内网update源的可用性

测试windows内网update源的可用性

原创
作者头像
Windows技术交流
修改2024-08-21 18:33:11
1310
修改2024-08-21 18:33:11
举报
文章被收录于专栏:Windows技术交流

使用内网源更新,遇到过各种报错,如何判断windows内网update源的可用性?

代码语言:txt
复制
0x80244007
0x80244015
0x80244010
0x80240039
0x8024401c
0x8000FFFF(没有语言包时的报错)
以上是走内网windows update源时可能遇到的报错

0x80072EE2(无公网却走公网更新时报错)

浏览器访问,也是时而通200 OK、时而不通403 Forbidden

代码语言:txt
复制
http://windowsupdate.tencentyun.com/
http://windowsupdate.tencentyun.com/ReportingWebService/
http://windowsupdate.tencentyun.com/Content/anonymousCheckFile.txt

200 OK截图:

403 Forbidden截图:

powershell测试的情况:也是时而通时而403 Forbidden

以上这种,肯定是windows内网update源的服务端有问题,不是客户端问题。

跟友商的内网update源对比,有一些简单的测试用例可以用来判断

【阿里云】

代码语言:txt
复制
http://update.cloud.aliyuncs.com/
http://update.cloud.aliyuncs.com/ReportingWebService/
http://update.cloud.aliyuncs.com/Content/anonymousCheckFile.txt
代码语言:txt
复制

curl http://update.cloud.aliyuncs.com/ApiRemoting30/					访问401符合预期
curl http://update.cloud.aliyuncs.com/Content/						访问403符合预期

curl http://update.cloud.aliyuncs.com/ReportingWebService/
curl http://update.cloud.aliyuncs.com/aspnet_client/
curl http://update.cloud.aliyuncs.com/ClientWebService/
curl http://update.cloud.aliyuncs.com/DssAuthWebService/
curl http://update.cloud.aliyuncs.com/Inventory/
curl http://update.cloud.aliyuncs.com/Selfupdate/
curl http://update.cloud.aliyuncs.com/ServerSyncWebService/
curl http://update.cloud.aliyuncs.com/SimpleAuthWebService/
代码语言:txt
复制
$testurl=""
$testurl=(curl http://update.cloud.aliyuncs.com/ApiRemoting30/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/Content/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;

$testurl=(curl http://update.cloud.aliyuncs.com/ReportingWebService/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/aspnet_client/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/ClientWebService/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/DssAuthWebService/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/Inventory/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/Selfupdate/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/ServerSyncWebService/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/SimpleAuthWebService/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
代码语言:txt
复制
wget http://update.cloud.aliyuncs.com/Content/anonymousCheckFile.txt -Outfile C:\anonymousCheckFile.txt
echo $?
#certutil -hashfile C:\anonymousCheckFile.txt MD5
(Get-FileHash -Path C:\anonymousCheckFile.txt -Algorithm MD5).Hash

#最终MD5值为D41D8CD98F00B204E9800998ECF8427E

除过前2个比较特殊(401、403符合预期),其他的都是200 OK才算服务端OK,例如

【腾讯云】

代码语言:txt
复制
curl http://windowsupdate.tencentyun.com/ApiRemoting30/					访问401符合预期
curl http://windowsupdate.tencentyun.com/Content/						访问403符合预期

curl http://windowsupdate.tencentyun.com/ReportingWebService/
curl http://windowsupdate.tencentyun.com/aspnet_client/
curl http://windowsupdate.tencentyun.com/ClientWebService/
curl http://windowsupdate.tencentyun.com/DssAuthWebService/
curl http://windowsupdate.tencentyun.com/Inventory/
curl http://windowsupdate.tencentyun.com/Selfupdate/
curl http://windowsupdate.tencentyun.com/ServerSyncWebService/
curl http://windowsupdate.tencentyun.com/SimpleAuthWebService/
代码语言:txt
复制
$testurl=""
$testurl=(curl http://windowsupdate.tencentyun.com/ApiRemoting30/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/Content/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;

$testurl=(curl http://windowsupdate.tencentyun.com/ReportingWebService/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/aspnet_client/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/ClientWebService/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/DssAuthWebService/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/Inventory/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/Selfupdate/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/ServerSyncWebService/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/SimpleAuthWebService/ -UseBasicParsing);($testurl.StatusCode).ToString()+" "+$testurl.StatusDescription;
代码语言:txt
复制
wget http://windowsupdate.tencentyun.com/Content/anonymousCheckFile.txt -Outfile C:\anonymousCheckFile.txt
echo $?
#certutil -hashfile C:\anonymousCheckFile.txt MD5
(Get-FileHash -Path C:\anonymousCheckFile.txt -Algorithm MD5).Hash

#最终MD5值为D41D8CD98F00B204E9800998ECF8427E

除过前2个比较特殊(401、403符合预期),其他的都是200 OK才算服务端OK,例如

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 以上这种,肯定是windows内网update源的服务端有问题,不是客户端问题。
  • 跟友商的内网update源对比,有一些简单的测试用例可以用来判断
相关产品与服务
云服务器
云服务器(Cloud Virtual Machine,CVM)提供安全可靠的弹性计算服务。 您可以实时扩展或缩减计算资源,适应变化的业务需求,并只需按实际使用的资源计费。使用 CVM 可以极大降低您的软硬件采购成本,简化 IT 运维工作。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档