安装 Application Insights 服务器监视器后站点无法加载 System.IO

Site can't load System.IO after installing Application Insights server monitor

我刚刚在测试服务器上安装了 Application Insights Server Monitor,在那里我有一个功能齐全的 .net 4.0 ASP.net 站点。

在站点上启用 AI 后,当我尝试加载它时出现错误:

Could not load file or assembly 'System.IO' or one of its dependencies.  
The located assembly's manifest definition does not match the assembly 
reference. (Exception from HRESULT: 0x80131040)

System.IO.FileLoadException: Could not load file or assembly 'System.IO' 
or one of its dependencies. The located assembly's manifest definition 
does not match the assembly reference. (Exception from HRESULT: 
0x80131040)

当我启用 AI 时,它会将几个 .net dll 复制到站点 /bin/, System.IO.dll 和 System.Threading.Tasks.dll。如果我删除它们,问题会自行解决,但 AI 不会从该站点接收到任何遥测数据。

我需要做什么来解决这个问题并启用监控?

您能否在检测后检查 bin 文件夹中 System.IO.dll 的程序集版本和 web.config 中定义的绑定重定向? 如果 System.IO.dll 是 2.0.10 版本并且绑定重定向显示 2.0.9,那么这个问题将在下周初的下一次更新中修复。 作为解决方法,您现在可以手动将绑定重定向设置为 2.0.10。对于这个错误,我感到非常抱歉!