Last post Jan 30, 2014 03:36 PM by Crazytw
Nov 08, 2006 10:18 PMfirstname.lastname@example.org|LINK
I just installed AJAX Beta 2 and the updated AjaxControlToolkit. I'm getting this error when I try to access the site. Any Ideas?
[FileLoadException: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. Access is denied.] System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0 System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211 System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141 System.Reflection.Assembly.Load(String assemblyString) +25 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32[ConfigurationErrorsException: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. Access is denied.] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +3487305 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177 System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +267 System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +36 System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +429 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +73 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +580 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +93 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +111 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +54 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31 System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40 System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +120 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Nov 09, 2006 01:49 PM|rb_jlm|LINK
You probably need to do one of the following:
1. Make the assembly copy local.
2. Put the assembly in the GAC.
Nov 09, 2006 03:41 PMemail@example.com|LINK
The solution that worked for me was I had to change my permissions on the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files folder. That corrected the issue!
Nov 09, 2006 04:11 PM|rb_jlm|LINK
Nov 14, 2006 10:59 PM|David Anson|LINK
Jan 23, 2007 10:45 PM|eappell|LINK
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
I've got the AjaxControlToolkit.dll file in my Bin folder, and I've re-added it a couple times, and then updated the reference, but no joy. I'm not sure what else to do.
One interesting thing that's happening is, I've deployed this app to our development server and it runs fine - no errors, even on the page that references the assembly. However, the development server has NOT yet been upgraded to ASP.NET AJAX 1.0. This
error only happens on my local instance... So it appears to be related to the new AJAX release, not the AjaxControlToolkit assembly (I do have the most recent release of the ACT on the dev server in my Bin directory)...
If anyone has any other ideas for how I might get this working, please reply!
Jan 23, 2007 11:52 PM|Chris Porter|LINK
Jan 24, 2007 05:12 PM|eappell|LINK
I tried what you suggested, but I still get the same error. I did try installing it to the GAC, but I get an Access denied error there as well:
"Failure adding assembly to the cache: Access denied."
This is an app that I am constantly updating and re-publishing to the site, so it's got me very concerned since I have to launch a new version of it next week... PLEASE, if anyone can tell me how to resolve this, let me know - I am DESPERATE.
Jan 24, 2007 05:33 PM|eappell|LINK
One more thing... If I open up the Sample website from the AjaxControlToolkit and try to compile I get the same error:
Error 1 Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. Access is denied.
So this seems to be a system-wide error. I re-ran the installation of the 1.0 extensions (repair) and the CTP, but no luck...
Jan 24, 2007 07:10 PM|kirtid|LINK
Jan 25, 2007 02:37 AM|eappell|LINK
Wel, I didn't really change anything, but when I came back from lunch everything seems to be working fine now. I'm really stumped as to what may have caused this, or what may have fixed it, but I'm glad it's working. Now I've got to install asp.net ajax
1.0 on my server and hope the same thing doesn't happen there...
BTW, I did have the release of asp.net ajax installed - in fact I uninstalled it a couple times and reinstalled it, so I'm pretty sure the installation was successful. Also, I am using the most recent version of AjaxControlToolkit.dll which came out yesterday...
Thanks for all your help, this one, I'm afraid, is a mystery...
Mar 16, 2007 08:40 PM|Puhfista|LINK
How is it that you make the AjaxControlToolKit copy local?
Mar 19, 2007 03:46 PM|eappell|LINK
I just added a reference to my project, pointed it to the dll and it added it to my bin folder. I don't have it installed in the GAC...
Jul 13, 2007 06:59 PM|bishpop999|LINK
Sep 05, 2007 09:20 PM|Adancin|LINK
Only grant read and execution permissions to the bin/AjaxControlToolkit.dll file for everyone
Oct 15, 2007 08:46 AM|skqi|LINK
copy to bin folder will do. Check http://dotnetfish.blogspot.com/2007/10/could-not-load-file-or-assembly.html
May 21, 2008 12:44 PM|javikiller|LINK
I have almost the same problem, i have VS2005 installed on 3 computers in the office, and 4 days ago one of them stop work with ajax, i tried to remove the folder into Visual Studio 8 that i named AjaxToolkit and again unzipping the AjaxControlToolkit.zip with
the same name, but now i have a builds errors like this:
Warning 9 Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'C:\Archivos de programa\Microsoft Visual Studio 8\AjaxToolkit\SampleWebSite\Bin\AjaxControlToolkit.dll' or one of its dependencies. The
module was expected to contain an assembly manifest. PayUp.Web
When i trid to add the reference in my web project a warning icon shows in the reference Ajaxcontroltoolkit reference, and the propierties dont fill the culture, description, version, etc, and in the others computers the reference ajaxcontroltoolkit's propierties
fill all the fields correctly.
I tried to remove the temporaly files in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 but the error still there and i have tried to unistall the VS05 and the error still there.
I dont know how to do!!
Jun 09, 2008 05:46 PM|lasstlos|LINK
Here's what I did to resolve this under VS2008 (its probably very similar under VS2005):
First, on any project where I'm using dlls, I always create a dll folder to hold them. I NEVER rely on the bin folder for references (since that would be cleared out when running a clean operation and most source control programs do not include the bin
file when checking in/out) or on local copies of the dll (c:\ajax\2.0\bin\ajaxcontroltoolkit.dll). Sure, the build operation puts a copy there but thats its job--leave the bin file to the build script. If you ever work on your code somewhere else, publish
it to another machine, or hand it off to someone else; you don't have to worry about whether the new machine has its ajaxcontroltoolkit.dll installed in the same location on its hard drive as yours. As a side note, under the properties -> advanced for the
dll, I have a build action set to content and a copy to output directory set to do not copy
Second, I go into the references, remove any current ajaxcontroltoolkit references (or any other special dlls that I was using and am moving to the dll folder), and add the dll references back in pointing to the copies in my dll folder.
Thirdly, if I'm going to be using something like the ajaxcontroltoolkit on most of my pages, I go ahead and throw the following into the web.config file so I dont have register statements on every page:
<add tagPrefix="cc1" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/>
Hope this helps, it took me a while to get it right
If this is an intermittent problem for you (ie, it works for a bit after a build and then you get a parser error), try stopping and starting IIS. In my case, the ajaxcontroltoolkit that the build script had placed in the bin folder was being replaced with
an earlier verison of the toolkit. Restarting IIS seems to have fixed this. Since doing this, my version in the bin folder has not reverted to 1.16xxx, it stays a 1.19xxx and I don't have any more frustrating errors.
Sep 03, 2008 07:18 PM|awarberg|LINK
I too have a website, which emits these errors at random. ASP.NET is a great idea and has worked well for me many years.
It appears, however, that Microsoft is now losing grips of its product, as to which the sporadic nature of this issue can only attest.
It seems that an overall goal of Microsoft is to weave their users/developers into a net, from which it is diffult to migrate.
Sep 09, 2008 03:57 PM|jwfoster|LINK
<br /><br />
Sep 18, 2008 01:23 PM|Siva_V|LINK
Sep 22, 2008 05:43 PM|lividsquirrel|LINK
I was not able to solve this problem until I finally granted access to "Everyone" on the .../Temporary ASP.NET Files folder. However, when I looked into this, I found this worked because my application was impersonating a specific service account.
I would encourage everyone to clearly identify the user that the process is running as! Does your web app impersonate the current user? If so, it would likely work on your development machine, where you are an admin, but you would see this
error on a server where you didn't have privileges to the temporary asp.net folder. Also consider what identity your app pool is running under.
Sep 22, 2008 05:46 PM|lividsquirrel|LINK
sorry, accidental double-post
Sep 23, 2009 12:08 PM|vasireddybharath|LINK
You are right...It worked for me also. Thanks man..!
Sep 23, 2009 12:12 PM|vasireddybharath|LINK
It worked for me. Thanks alot.....
Dec 14, 2009 04:38 PM|sajeelmunir|LINK
The given solution on the following site solve this problem.
Life in the UK Test
"AJAX .NET 2.0" " "Ajax Control Toolkit"
Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies
Jun 29, 2010 12:57 PM|krantisinhpatil|LINK
Feb 17, 2011 07:05 PM|orinw|LINK
This also worked for me... Thanks!
Nov 08, 2011 03:32 PM|MarniSatya|LINK
This Issue got resolved for me when I gave permission to my Id under IISUSER and USERS group in comp management.
Nov 10, 2011 02:18 PM|nicolas.fortin|LINK
You may receive this error if you are running your site with impersonation. Check your web.config impersonation tag and/or the security context that the particular user is running under:
<br /><br />
That solved my problem
Thanks for the answer.
Jan 30, 2014 03:36 PM|Crazytw|LINK
I got this error with no reason and I came across this post. None of reply helped me but I looked at my error message and went to C:\Users\"loginUserID"\AppData\Local\Temp\Temporary ASP.NET Files
added my creditial to folder Temporary ASP.NET Files, solved my problem.
I thought this may help somebody.