程序集未为ASP.NET Web应用程序加载 [英] Assembly not loading for ASP.NET web application
问题描述
我有一个引用外部DLL的Web应用程序(简称为productA.dll)
I have a web application which references an external DLL (lets call this productA.dll)
我已经更新了我的GAC,我的web.config
和我的参考文件,检查了版本,一切看起来都一致.
I have updated my GAC, my web.config
, and my references, checked the versions and everything looks consistent.
但是,当我运行应用程序时,无法调用在productA.dll
中使用的方法,并且会出现the specified module cannot be found
错误.
However, when I run my application, methods that I use from productA.dll
cannot be called, and I get a the specified module cannot be found
error.
我尝试创建Windows应用程序,并且可以很好地使用productA.dll
.
I tried creating a windows application and I can use productA.dll
perfectly fine.
在运行Web应用程序期间观察输出窗口时,我注意到未加载productA.dll
符号.所以我猜这就是为什么找不到模块的原因.
Observing the output window during run-time for the web application, I noticed that productA.dll
symbols are not loaded. So I'm guessing that is why the module cannot be found.
问题是:为什么不加载符号?
The question is: why are the symbols not being loaded?
有关解决方案或诊断技术的任何提示将不胜感激.
Any tips on the solution or diagnostics techniques would be greatly appreciated.
推荐答案
不要求程序集位于GAC中.我说要检查以下内容:
It's not a requirement that the assembly be in the GAC. I'd say to check the following:
- 您的程序集位于网站的bin文件夹中.
- 您的程序集在web.config的程序集"部分中引用.
- web.config中的程序集引用具有正确的版本号.
顺便说一句,只有在程序集旁边有调试文件(.pdb)时,才会加载符号.
By the way, symbols will only be loaded if you have the debug file (.pdb) along side the assembly.
这篇关于程序集未为ASP.NET Web应用程序加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!