无法加载文件或程序集' [网站]'或其中一个依赖项。访问被拒绝

时间:2014-04-28 19:48:40

标签: asp.net iis-7

如果过去已经回答过这个问题我很抱歉。我已经搜索了高低的答案,但以前的帖子中的所有建议都没有解决我的问题。这就是我发布这个问题的原因。

我正在将以前在2003 / IIS6下运行的Web服务转换为2008 R2 / IIS7。我是2008 R2 / IIS7的新用户,所以我很抱歉这是一个我不熟悉的简单修复。

我创建了一个名为ILXQuoteServer的自定义应用程序池,但在经典.Net应用程序池之后对其进行了建模,因此两个池中的所有配置都匹配。

当我收到上述错误时,我重置所有应用程序权限以使用[本地主机] \网络服务,并为Web服务文件夹提供[本地主机] \网络服务读取/执行/列表权限。

然而,这些修复都没有奏效。这是完整的错误。希望这是一个简单的修复。

感谢。

=============================================== ===================

'/ ILXQuoteServer'应用程序中的服务器错误。

无法加载文件或程序集“ILXQuoteServer”或其依赖项之一。访问被拒绝。

描述:在执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息: System.IO.FileLoadException:无法加载文件或程序集“ILXQuoteServer”或其依赖项之一。访问被拒绝。

来源错误:

在执行当前Web请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息。

程序集加载跟踪:以下信息有助于确定无法加载程序集“ILXQuoteServer”的原因。

=== Pre-bind state information ===
LOG: User = Unknown
LOG: DisplayName = ILXQuoteServer
 (Partial)
LOG: Appbase = file:///D:/MA Install/ILXQuoteServer/
LOG: Initial PrivatePath = D:\MA Install\ILXQuoteServer\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\MA Install\ILXQuoteServer\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\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/Framework/v2.0.50727/Temporary ASP.NET Files/ilxquoteserver/70368188/9ded7e96/ILXQuoteServer.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/ilxquoteserver/70368188/9ded7e96/ILXQuoteServer/ILXQuoteServer.DLL.
LOG: Attempting download of new URL file:///D:/MA Install/ILXQuoteServer/bin/ILXQuoteServer.DLL.
LOG: Using application configuration file: D:\MA Install\ILXQuoteServer\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
ERR: Failed to complete setup of assembly (hr = 0x80070005). Probing terminated.

堆栈追踪:

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

[FileLoadException: Could not load file or assembly 'ILXQuoteServer, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null' 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.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
   System.Reflection.Assembly.Load(String assemblyString) +28
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: Could not load file or assembly 'ILXQuoteServer, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
   System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
   System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +232
   System.Web.Compilation.BuildManager.CompileGlobalAsax() +51
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337

[HttpException (0x80004005): Could not load file or assembly 'ILXQuoteServer, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729

[HttpException (0x80004005): Could not load file or assembly 'ILXQuoteServer, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8921851
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259

Version Information: Microsoft .NET Framework Version:2.0.50727.5456; ASP.NET Version:2.0.50727.5456

1 个答案:

答案 0 :(得分:1)

您是否尝试过授予Temporary ASP.NET files文件夹中的帐户权限?

在大多数计算机上,它位于:C:\ Windows \ Microsoft.NET \ Framework \ v2.0.50727 \ Temporary ASP.NET Files