未能加载文件或程序集“AspNetPager”或它的某一个依赖项。拒绝访问。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.IO.FileLoadException: 未能加载文件或程序集“AspNetPager”或它的某一个依赖项。拒绝访问。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  程序集加载跟踪: 下列信息有助于确定程序集“AspNetPager”无法加载的原因。
=== 预绑定状态信息 ===
日志: 用户 = Unknown
日志: DisplayName = AspNetPager
 (Partial)
日志: Appbase = file:///D:/goawoo.com/
日志: 初始 PrivatePath = D:\goawoo.com\bin
调用程序集: (Unknown)。
===
日志: 此绑定从 default 加载上下文开始。
日志: 正在使用应用程序配置文件: D:\goawoo.com\web.config
日志: 使用 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config 的计算机配置文件。
日志: 此时没有为引用应用策略(私有、自定义、分部或基于位置的程序集绑定)。
日志: 试图下载新的 URL file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/goawoo.com/0c1f076d/7b15d3c/AspNetPager.DLL。
日志: 试图下载新的 URL file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/goawoo.com/0c1f076d/7b15d3c/AspNetPager/AspNetPager.DLL。
日志: 试图下载新的 URL file:///D:/goawoo.com/bin/AspNetPager.DLL。
日志: 正在使用应用程序配置文件: D:\goawoo.com\web.config
日志: 使用 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config 的计算机配置文件。
日志: 策略后引用: AspNetPager, Version=7.0.2.0, Culture=neutral, PublicKeyToken=fb0a0fe055d40fd4
错误: 未能完成程序集的安装(hr = 0x80070005)。探测终止。 堆栈跟踪: 
[FileLoadException: 未能加载文件或程序集“AspNetPager”或它的某一个依赖项。拒绝访问。][FileLoadException: 未能加载文件或程序集“AspNetPager, Version=7.0.2.0, Culture=neutral, PublicKeyToken=fb0a0fe055d40fd4”或它的某一个依赖项。拒绝访问。]
   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) +54
   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: 未能加载文件或程序集“AspNetPager, Version=7.0.2.0, Culture=neutral, PublicKeyToken=fb0a0fe055d40fd4”或它的某一个依赖项。拒绝访问。]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +211
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177
   System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +185
   System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +350
   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125
   System.Web.Compilation.BuildManager.CompileCodeDirectories() +525
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +448[HttpException (0x80004005): 未能加载文件或程序集“AspNetPager, Version=7.0.2.0, Culture=neutral, PublicKeyToken=fb0a0fe055d40fd4”或它的某一个依赖项。拒绝访问。]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +57
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +612
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +644[HttpException (0x80004005): 未能加载文件或程序集“AspNetPager, Version=7.0.2.0, Culture=neutral, PublicKeyToken=fb0a0fe055d40fd4”或它的某一个依赖项。拒绝访问。]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3465427
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +279 

解决方案 »

  1.   

    AspNetPager.dll应该放到bin里,也就是D:\goawoo.com\bin 
      

  2.   


    在bin文件夹里面啊,只不过我是Bin有区别吗?
      

  3.   

    现在发现所有bin下面的dll都有这样的问题,为什么啊?
      

  4.   

    或者AspNetPager依赖的dll没有放到bin中?
      

  5.   

    你先把AspNetPager.dll 添加到.NET Framework组件看看行不行。然后再从工具箱托出来
      

  6.   

    我也遇到了,我是用三层做的,可能是config配置文件的问题。
    尚在求解中!!!
      

  7.   

    我也遇到这个问题。但是我的是:
    <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
    中的assembly="AspNetPager"的值跟AspNetPager_DLL.dll文件名不相同。后来把文件文件名改为AspNetPager.dll就行了
    。。
      

  8.   

    重新启下IIS或者是服务器就好了.
      

  9.   

    用三层做的 在其他类库中添加了该类库 把它们更新为同一个版本的AspnetPager 就行了..
    我是用的他们的源代码又生成一次 把dll拿出来 再更新的
      

  10.   

    我也遇到了这样的问题,是web.config
    <controls>
    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    去掉这个就ok了 <add tagPrefix="webdiyer" namespace="Wuqi.Webdiyer" assembly="AspNetPgaer" />
      

  11.   

    我也碰到了,是权限的问题。AspNetPager.dll没权限