首页 新闻 会员 周边 捐助

异常详细信息: System.Runtime.InteropServices.COMException: 由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。 (异常来自 HRESULT:0x800736B1)

0
悬赏园豆:30 [已关闭问题]

用到了PDFReader读取PDF文件,开发环境Asp.net(C#),WinXP,Sql server2000,B/S,本机发布可用。发布到服务器后报错,服务器为Win2003,Sql server2005。报错如下:

[COMException (0x800736b1): 由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。 (异常来自 HRESULT:0x800736B1)]

[FileLoadException: 未能加载文件或程序集“PDFLibNet, Version=1.0.6.5, Culture=neutral, PublicKeyToken=26d87f7d66fb2aee”或它的某一个依赖项。由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。 (异常来自 HRESULT:0x800736B1)]
   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: 未能加载文件或程序集“PDFLibNet, Version=1.0.6.5, Culture=neutral, PublicKeyToken=26d87f7d66fb2aee”或它的某一个依赖项。由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。 (异常来自 HRESULT:0x800736B1)]
   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.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163
   System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53
   System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175
   System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +83
   System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261
   System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101
   System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +62
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33
   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) +160
   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

孟子国一的主页 孟子国一 | 初学一级 | 园豆:75
提问于:2010-07-19 16:06
< >
分享
其他回答(1)
0

1、注意 load和loadfrom 的区分,需要看你的程序集是否依赖了其他程序集;

2、引用版本的一致性;

winzheng | 园豆:8797 (大侠五级) | 2010-07-19 21:17
如果有问题为什么发布在WinXP上可以运行,发布在Win2003上就不行,有人说是权限问题,可是我调整也不行。
支持(0) 反对(0) 孟子国一 | 园豆:75 (初学一级) | 2010-07-20 10:13
0

兄弟 如果解决了记得跟我说一下啊,我也遇到此问题了,其实本机是没有问题的,因为本机安装 vs 时,装了不少.net的东西。但服务器并没有安装 。 最根本的原因应该是 pdflibNet 可能是vb.net 的,而自己用的却是 C# ,闷啊,我反编译 pdflibnet 后,一堆错误,想转成 c#的,现在已没辙了 。。。

旷~野 | 园豆:210 (菜鸟二级) | 2010-10-14 18:01
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册