views:

2335

answers:

4

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?

A: 

Hello,

Odd error. Is anything in your web.config file pointing to the AjaxControlToolkit with a public key token or other assembly specifications provided? That has happened to me, where a value changed or I changed from a reference in the GAC to a local reference...

HTH.

Brian
A: 

Not 100% sure why this worked, but in the appropriate Temporary ASP.Net Files directory (located at: C:\Windows\Microsoft.NET\Framework64\v4.0.21006\Temporary ASP.NET Files[projectName]) I manually coppied the AjaxControlToolkit.dll.

I was then presented with additional DLLs that were missing, but upon manually copying them to this location also I was able to resolve these issues. Doesn't seem like the best answer, but it ended up working for me.

ChrisHDog
Just out of curiosity, did you ever try just deleting all of the temp files?
Chris Lively
I did try to just delete all the temp files, but no luck
ChrisHDog
+2  A: 

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.

Jeremy
I fixed this by adding the impersonation user to the IIS_IUSRS group on my Vista workstation.
jrummell
+1  A: 

I think the post about the Temp files in C:\Windows\Microsoft.NET\Framework64\v4.0.21006\Temporary ASP.NET Files[projectName] was on the right track.

I solved the problem by editing permissions to be sure that the ASP Impersonating user (found in the security section of IIS as the Anonymous user that the app should use when allowing anonymous access) had the proper security to the directory.

Solved the problem... Access Denied ussually points to a permissions issue.