Assembly not loading for ASP.NET web application

冷暖自知 提交于 2019-12-13 03:47:46

问题


I have a web application which references an external DLL (lets call this productA.dll)

I have updated my GAC, my web.config, and my references, checked the versions and everything looks consistent.

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.

I tried creating a windows application and I can use productA.dll perfectly fine.

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.


回答1:


It's not a requirement that the assembly be in the GAC. I'd say to check the following:

  1. Your assembly is in the website's bin folder.
  2. Your assembly is referenced in the assemblies section of the web.config.
  3. The assembly reference in the web.config has the correct version number.

By the way, symbols will only be loaded if you have the debug file (.pdb) along side the assembly.



来源:https://stackoverflow.com/questions/306891/assembly-not-loading-for-asp-net-web-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!