0

尝试了在网上找到的所有解决方案,但仍然无法修复我的错误:在 64 位 Windows 2008 R2 上,我的错误日志如下:

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

非常感谢您的帮助

我试图授予临时文件权限,授予 iis 文件夹和临时文件上的每个人的权限,

4

1 回答 1

1

这似乎是文件系统权限错误,如所示

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

文档说您需要为以下用户/用户组授予以下文件系统权限。

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
于 2012-07-18T10:36:03.423 回答