gpt4 book ai didi

c# - 如何解决 'Could not load file or assembly ' Microsoft.AI.Web' 或其依赖项之一的错误?

转载 作者:太空狗 更新时间:2023-10-29 21:32:33 24 4
gpt4 key购买 nike

我将我的 asp.net 文件上传到网络服务器。首先显示

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->



<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration

然后我添加 <customErrors mode="Off">在 web.config 文件中。

之后,当我运行它时,它会显示以下错误。

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.AI.Web' or one of its dependencies. The system cannot find the file specified.

我完整地上传了我的项目文件,例如 bin、css、js、图像和表单。我第一次在网络服务器上载。请告诉我我该怎么做。

最佳答案

我昨天在部署一个包含应用程序洞察到生产的应用程序时遇到了这个完全相同的错误(奇怪地进行了验收工作,但是哦,好吧)。不知何故,该项目被错误地配置为不复制一堆引用(包括 Microsoft.AI.Web 引用)。

事实证明解决方案非常简单:

Install-Package Microsoft.ApplicationInsights.Web

这安装了新版本的 application insights 并修复了引用。或者,我怀疑重新安装该软件包会起到同样的作用。

关于c# - 如何解决 'Could not load file or assembly ' Microsoft.AI.Web' 或其依赖项之一的错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39618695/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com