无法加载文件或程序集 - 在本地工作而非生产 - ASP.net [英] Could not load file or assembly - working on local not on production - ASP.net

查看:25
本文介绍了无法加载文件或程序集 - 在本地工作而非生产 - ASP.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个问题,该项目在本地运行良好,但在生产中不起作用

I have this problem, where the project works fine on local, it just doesn't wortk on production

在本地,一切都在 IIS Express 上运行

on local, everything works on IIS Express

生产,IIS 7.5,Windows 2008 r2:

on production, IIS 7.5, windows 2008 r2:

Exception type: ConfigurationErrorsException 
    Exception message: Could not load file or assembly 'Telerik.OpenAccess, Version=2014.3.1209.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The system cannot find the file specified. (\xxxxxxxxxweb.config line 106)

  1. 实际检查了位置中的文件版本,它们存在且正确
  2. 从生产中删除完整文件夹,然后部署
  3. 检查并勾选 IIS 上的 32 位应用程序兼容性

还请注意,我们在生产中部署了该项目的先前版本(具有相同的引用文件和版本) - 只有目标 .net 版本已更改并且停止工作(它仍然针对相同的程序集,并在本地)

also note that we had a previous version of the project deployed on production ( with same referenced files and versions) - only the target .net version has been changed and it stopped working (it's still targetting the same assembly, and works on local)

文件在那里并且引用项目中的所有引用都对这个文件是正确的

the files are there and all references in the referenced projects are correct for this file

我还能看什么?

推荐答案

事实证明的解决方案 -如下:

The solution as it turns out - is as follows:

  • 虽然我们从项目输出中删除了 bin 目录并重新构建 - 它没有任何效果
  • 解决方案是清理所有解决方案,然后重建

显然应该尝试过,但有时您的想法不起作用:)

obvious should have tried that , but sometimes your mind doesn't work :)

这篇关于无法加载文件或程序集 - 在本地工作而非生产 - ASP.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆