ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

.NetCore异常:Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies.

2022-01-31 03:00:08  阅读:197  来源: 互联网

标签:load Web assembly String System Boolean file


阅文时长 | 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程序报错:

Server 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即可。

标签:load,Web,assembly,String,System,Boolean,file
来源: https://www.cnblogs.com/SCscHero/p/15857951.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有