Could not load file or assembly 'AjaxControlTo

2019-02-12 02:22发布

I have a web application that I am attempting to upgrade to .net 4.0.

I took the application and opened it via Visual Studio 2010 Beta 2 and selected the upgrade path for that application. The application uses the AjaxControlToolkit. Now that the upgrade is complete when I attempt to access a page I get the error message: "Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. Access is denied."

I've tried:

  • Restarting my machine
  • Clean Solution
  • Removing all files in Temporary ASP.Net Files
  • Relaxing permsissions (added Everyone with Full Control) on the Bin directory, the Temporary ASP.Net Files directory
  • Removing and readding the reference to the AjaxControlToolkit DLL

The related web.config entries for the AjackControlToolkit are:

<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
  <controls>
    <add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit"/>
  </controls>
</pages>

Any ideas as to what is occuring here/how I can fix this issue?

11条回答
Viruses.
2楼-- · 2019-02-12 02:57

I had a similar problem but was able to resolve by granting full rights to the "Temporary ASP.NET Files" folder for my impersonation identity.

查看更多
祖国的老花朵
3楼-- · 2019-02-12 02:57

I got this error message (although another dll file) when I reinstalled my ASP.NET application on a new Windows Server 2008 machine. I searched for a solution to this for hours, trying absolutely everything, but to no avail. Until I deactivated McAfee antivirus. When I did, everything worked like a charm.

查看更多
Emotional °昔
4楼-- · 2019-02-12 03:02

I was facing the same issue. After a lot of research I found out that I was using impersonation in the config file. I had to change the impersonation ID to a different user that was local to the server and it resolved the issue immediately.

查看更多
5楼-- · 2019-02-12 03:08

You can try this: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ . Just clean up all the folders and files from inside this folder and compile ur application. Happy coding!

查看更多
三岁会撩人
6楼-- · 2019-02-12 03:08

Inspect the DLL's properties. If it states somewhere that "this file came from another computer", click the checkbox and "apply", to lift restrictions Windows has put in place.

查看更多
时光不老,我们不散
7楼-- · 2019-02-12 03:12

Remember to also open "Visual Studio" with "Run as administrator" using context-menu [right-click].

查看更多
登录 后发表回答