Why do I sometimes get “Could not load file or ass

2019-06-05 01:09发布

We recently published a new version of an asp.net website where we changed from AjaxControlToolkit version 3.0 to 3.5.

I checked the web site and found that it was running alright.

The following day I recieved the following two similar exception reports, that seems to relate to the change in version:

Could not load file or assembly 'AjaxControlToolkit, Version=3.0.20229.20843, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies.

The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Request information:

1) Request URL: http://.../Default.aspx? _TSM_HiddenField_=ctl00_sm1_HiddenField &_TSM_CombinedScripts_=%3B%3BAjaxControlToolkit %2C+Version%3D3.0.20229.20843%2C+Culture%3Dneutral%2C+ PublicKeyToken%3D28f01b0e84b6d53e%3Aen-US%3A3b7d1b28-161f-426a-ab77-b345f2c428f5%3Ae2e86ef9%3A1df13a87%3A8ccd9c1b

2) Request URL: `http://.../Login.aspxReturnUrl=%2FUser%2FFaqPosting.aspx%3F _TSM_HiddenField_%3Dctl00_sm1_HiddenField %26_TSM_CombinedScripts_%3D%253B%253BAjaxControlToolkit %252C%2BVersion%253D3.0.20229.20843%252C%2 BCulture%253Dneutral%252C%2BPublicKeyToken %253D28f01b0e84b6d53e%253Aen-US%253A3b7d1b28-161f426aab77b345f2c428f5 %253Ae2e86ef9% 253A1df13a87%253A8ccd9c1b[...]

(sm1 refers to asp.net ScriptManager)

I do not understand why these exceptions did not happen when I tested the web site, but then later happened for some requests by some other users.

Do any of you know why this might happen? Or have a hint to how I find out?

5条回答
Viruses.
2楼-- · 2019-06-05 01:31

I suggest that it might be due to the caching of some content in a user's browser, such that the browser uses the old request URL's. Or that it might be a search engine trying to use an old stored URL.

查看更多
你好瞎i
3楼-- · 2019-06-05 01:34

My guess is you did not update the web.config file on the production server and it still has references to the 3.0 versions. That is the most common reason I find for this type of error.

The second place to look is in the individual files. Once you erradicate the wrong reference, wherever it is, your problem should disappear. The important part is examining the files you do not overwrite when you publish. web.config is the most commmon.

查看更多
爷的心禁止访问
4楼-- · 2019-06-05 01:38

This always happens to me because of permissions on the folder containing the dll. Go there and give full control to the user account that asp.net is running under, and that should take care of it.

查看更多
老娘就宠你
5楼-- · 2019-06-05 01:49

I would use the aspnet_regiis tool to reinstall the asp.net component of the .net framework.

Resources:

http://msdn.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx

http://blogs.x2line.com/al/archive/2007/07/15/3203.aspx

查看更多
爷的心禁止访问
6楼-- · 2019-06-05 01:51

Check if you have Panda or other firewall/antivirus running. I have this issue with Panda lately. Good Luck!

查看更多
登录 后发表回答