Could not load file or assembly ‘AjaxControlToolkit’ or one of its dependencies. Access is denied.

Problem: Recently i came across this problem while switching to a new Windows 7 64 bit m/c. The web site at hand was working fine on my previous m/c Windows 7 64 bit RC1. The error and the event log were basically not very helpful either.

Resolution:

So here is what I did to fix the issue (to get it to work using IIS):

1. Make sure that the dll in question is either set to “Copy to: Local). Go to References, right click on AjaxControlToolkit and select properties. In my case it was already set to Copy Local. So that was not the issue

2. Open IIS Manager, browse to the AppPool (in my case it was the DefaultAppPool… it is just a Dev box, ok!). Go to Advanced Settings, and set Enable 32-bit Applications to true. Now that did fix the problem I was having.

For Cassini:

1. I had to give modify rights on the asp.net temp folder  to the Apppool identity (in my case IIS users group).

Discussion

  • On further research (i.e. “google”), I came to the conclusion that it was a permissions error related to the Temporary ASP.NET Files folder (C:\Windows\Microsoft.NET\Framework64\v2.0.50727). Some of the other fixes for this problem can be found on other blogs. They relate to the access permissions on the ASP.NET folder, Trust level Settings on the Website, and Anti-virus settings. Here is a link to some of them:
  • What I found was that the main focus while resolving this error should be on the later part of the error that says ‘Access is denied’ or “Invalid Argument’ etc.. that will help you in attacking the issue. In my case it was the fact that I was running a 32 bit app on a 64 bit mc and a permissions issue as well on the Temporary ASP.NET folder.
  • If you get an ‘Access Denied’..try checking the permissions on the Temp ASP.NET folder.
  • If you get ‘Invalid Argument’ try cleaning the temp asp.net folder and restarting the web site.

http://lichao.net/eblog/fix-access-is-denied-exception-from-hresult-0×80070005-e_accessdenied-on-local-machines-200905307.html

http://weblogs.asp.net/joshuajohnson/archive/2008/12/22/could-not-load-file-or-assembly-ajaxcontroltoolkit-or-one-of-its-dependencies-the-parameter-is-incorrect-exception-from-hresult-0-215-80070057-e-invalidarg.aspx

http://msforums.ph/forums/t/46678.aspx

This entry was posted in .NET Framework, General. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

4 Comments

  1. JessicaD
    Posted September 2, 2009 at 10:03 am | Permalink

    Kadasani,

    Microsoft does have an official Windows 7 RC Support Forum located here http://tinyurl.com/9fhdl5 . It is supported by product specialists as well as engineers and support teams. You may want to check the threads available there for additional assistance and feedback.

    Jessica
    Microsoft Windows Client Team

  2. Howie
    Posted September 24, 2009 at 1:44 pm | Permalink

    “Enable-ing 32-bit Applications to true” did it for me. Thanks!

  3. pablop
    Posted April 2, 2010 at 5:41 pm | Permalink

    Here is what worked for me:
    http://www.integrationpractices.com/post/2010/04/03/Could-not-load-file-or-assembly-AjaxControlToolkit-or-one-of-its-dependencies.aspx

  4. Mehboob Ali Yousafza
    Posted March 9, 2011 at 2:20 pm | Permalink

    Thanks alot.it was antivirus issue and also i gave permissions on the Temp ASP.Net Folder

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*