博主『SCscHero』
请选择金额
【5角】
【1元】
【2元】
【闪存】
【首页精华】
【小组】
【新闻】
【博问】
【收藏】
【招聘】
【文库】
【随便看看】
【班级】
【添加新随笔】
【随笔管理】
【文章管理】
【日记管理】
【评论管理】
【标签管理】
【链接管理】
【相册管理】
【文件管理】
【设置】
【选项】
公告板
每一个伟大的成功,都有一个微不足道的开始。
博客速览
.NET Core15
.NET MVC3
.NET SDK3
.NET/C#28
C#8
CLI1
Gateway1
GIT6
Java6
Javac2
Javascript3
Linux4
MongoDB1
MSSQL40
NoSql1
Office8
PC技术16
Psftp1
Putty1
Python7
VBA5
VCS2
Visual Studio5
VSCode2
Vue1
WCF1
WIKI2
Word1
测试5
后端架构设计2
技能Get17
排坑系列3
前端6
生产力提升2
通用技术11
微服务3
英语自然语言1
运维9
正则表达式1
2024年11月(2)
2024年9月(1)
2022年6月(7)
2022年5月(9)
2022年4月(3)
2022年3月(6)
2022年2月(8)
2022年1月(19)
2021年12月(6)
2021年8月(20)
2021年7月(32)
2021年6月(5)
2021年5月(22)
2021年4月(5)
2021年3月(9)
2021年2月(2)
2020年12月(2)
2020年9月(4)
2020年6月(3)
2020年3月(2)
更多
Sql Server33
NodeJs2
Npm1
英语口语句子1
MSSQL33
JMeter2
MSSQL进阶1
应用程序池1
数据库16
Javac2
Maven1
向日葵远程工具1
.Net/C#10
Aspose2
Log4J1
微信1
GIT9
asp.net2
JS1
数据同步1
Visual Studio7
人工智能2
Javascript1
清理电脑1
Python7
全局设计2
Iphone兼容性问题1
前端调试1
Java7
排坑2
Intellij-idea1
前端1
.Net6
技能Get2
IDEA1
浏览器调试技巧1
Windows105
环境搭建2
html2canvas1
浏览器1
Linux5
测试工具2
HP笔记本1
开发语言1
IIS5
编码2
Excel1
开发技巧1
GitHub5
办公自动化2
Entity Framework1
开发工具1
运维5
Word通配符1
database1
惠普笔电1
调试技巧5
Word个性化1
cshtml1
后端1
WCF4
web.config1
consul1
高效办公1
VBA4
VS20221
CLI1
高并发测试1
VS3
VisualStudio1
Blazor1
服务器1
MSSQL基础3
VCS1
BIOS1
单元测试1
Microsoft3
Unicode1
Base641
大数据处理1
异常处理3
tcp/ip1
Aspose.Cells1
打印技巧1
.NetCore3
sqlcmd1
ABP_CLI1
7z1
.Net启动配置3
Sklearn1
ABP1
.Net异常1
Word VBA2
Scala1
注册中心1
.Net部署配置1
Word2
razor1
正则表达式1
.NET SDK1
Windows2
Putty1
远程控制1
.Net FW1
Vue2
Psftp1
有道词典1
.getignore1
VSCode2
Powershell1
游戏技巧1
.cab1
VBA基础2
postman1
油猴1
PC技术2
OwinStartup1
硬件1
Office2
OFFICE宏1
英语自然语言1
博主主页
博客园主页
BiliBili主页
GitHub主页
Weibo主页
CSDN主页
SC2主页
管理
RSS
私信
0浏览0评论.NET Core.NET/C#
首页/.NetCore异常:Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.分享:
阅文时长 | 1.28分钟 字数统计 | 2058.4字符
主要内容 | 1、引言&背景 2、解决方案 3、声明与参考资料
『.NetCore异常:Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.』
编写人 | SCscHero 编写时间 | 2022/1/28 PM3:43
文章类型 | 系列 完成度 | 已完成
座右铭 每一个伟大的事业,都有一个微不足道的开始。

一、引言&背景   完成度:100%

a) 应对问题

遇到一个问题,.NetCore程序报错:

exceptionServer Error in 'XXXXX' Application.
Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly "Microsoft.Al.Web' or one of its dependencies. The system cannot find the file specified.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The fllowing information can be helpful to determine why the assembly 'MicrosoftAl.Web' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.]
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBi
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflection0nly, StackCrawlMark& stackMark, IntPtr pPrivHos tBinder,
System.Type.GetType (String typeName, Boolean throwOnError, Boolean ignoreCase) +64
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +59
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignor
[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.]
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignor
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit) +30

b) 应用场景

  • .NetCore框架下环境启动异常。

二、解决方案   完成度:100%

  1. 开始以为是谁动了依赖项设置。于是检查了两个配置文件:XXXX.runtimeconfig.json、XXXX.deps.json,发现无问题。
  2. 又重新发布了一下替换了runtime,发现文件夹被另一个进程占用,但检查了各个进程,应该是并没有占用的,由于服务器还跑了其他生产应用,无法重启,需要继续检查。
  3. 检查了应用程序池,Restart一下报了错,怀疑是内存泄漏或者是资源问题。后来又Check了下.NET CLR Version,发现成了" v4.0",可能是被人动过?或者是应用程序池自动改的?将其设置为"No Managed Code"即可正常使用了。

三、声明与参考资料   完成度:100%

原创博文,未经许可请勿转载。

如有帮助,欢迎点赞、收藏、关注。如有问题,请评论留言!如需与博主联系的,直接博客私信SCscHero即可。

发表评论
  • 贴吧表情
  • QQ高清
  • emoji高清
发表评论修改评论
还没有人评论呢,快来发一条评论吧~
点击右上角即可分享
微信分享提示