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

查看:61
本文介绍了无法加载文件或程序集-在本地环境中工作而不在生产环境中-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. (\\xxx\xxx\xxx\web.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天全站免登陆