0

Tried every solution found on the net, but still couldn't fix my error: on 64 bit windows 2008 R2 here my error log:

Server Error in '/npp' Application.

    enter code here

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. Access is denied.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'AjaxControlToolkit' could not be loaded.


=== Pre-bind state information ===
LOG: User = Unknown
LOG: DisplayName = AjaxControlToolkit
 (Partial)
LOG: Appbase = file:///C:/inetpub/wwwroot/npp/
LOG: Initial PrivatePath = C:\inetpub\wwwroot\npp\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\inetpub\wwwroot\npp\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/npp/13400f43/eee46b06/AjaxControlToolkit.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/npp/13400f43/eee46b06/AjaxControlToolkit/AjaxControlToolkit.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/npp/bin/AjaxControlToolkit.DLL.
LOG: Using application configuration file: C:\inetpub\wwwroot\npp\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: AjaxControlToolkit, Version=3.0.30512.27788, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e
ERR: Failed to complete setup of assembly (hr = 0x80070005). Probing terminated.

Stack Trace: 


[FileLoadException: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. Access is denied.]

[FileLoadException: Could not load file or assembly 'AjaxControlToolkit, Version=3.0.30512.27788, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' 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) +416
   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190

[ConfigurationErrorsException: Could not load file or assembly 'AjaxControlToolkit, Version=3.0.30512.27788, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. Access is denied.]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11241896
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +388
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +232
   System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +48
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +210
   System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +76
   System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +283
   System.Web.Compilation.BuildManager.CompileGlobalAsax() +50
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +676

[HttpException (0x80004005): Could not load file or assembly 'AjaxControlToolkit, Version=3.0.30512.27788, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. Access is denied.]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +76
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +1012
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +1025

[HttpException (0x80004005): Could not load file or assembly 'AjaxControlToolkit, Version=3.0.30512.27788, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. Access is denied.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11335894
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4355316

Many thanks for your help

I tried to give permission to temporary file, give permission to everyone on iis folder and Temporary file,

Sameh
  • 934
  • 1
  • 14
  • 40

1 Answers1

1

It seems to be a file-system permissions error as indicated by

[FileLoadException: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. Access is denied.]

The documentation, says you need to give the following file-system permissions to the following users/user-groups.

Inetpub\Adminscripts                        Administrators          Full control
Inetpub\wwwroot (or content directories)    Administrators          Full control
Inetpub\wwwroot (or content directories)    System                  Full control
Inetpub\wwwroot (or content directories)    IIS_WPG                 Read, execute
Inetpub\wwwroot (or content directories)    IUSR_MachineName        Read, execute
Inetpub\wwwroot (or content directories)    ASPNET                  Read, execute
Anirudh Ramanathan
  • 46,179
  • 22
  • 132
  • 191