首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Tessnet2“无法加载文件或可装入”

Tessnet2“无法加载文件或可装入”
EN

Stack Overflow用户
提问于 2012-05-23 21:23:10
回答 1查看 3.1K关注 0票数 0

我已经实现了Tessnet2库来在我的网络项目中工作。在调试时,我去掉了所有“常用”的bugs++。

当我使用visual studio 2010将此解决方案部署到get服务器并测试站点时,我收到错误消息:

代码语言:javascript
复制
Could not load file or assembly 'tessnet2_32' or one of its dependencies. 
An attempt was made to load a program with an incorrect format.

堆栈跟踪如下:

代码语言:javascript
复制
[BadImageFormatException: Could not load file or assembly 'tessnet2_32' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +123

[ConfigurationErrorsException: Could not load file or assembly 'tessnet2_32' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11568160
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +485
   System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +79
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +337
   System.Web.Compilation.BuildManager.CallPreStartInitMethods() +280
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1167

[HttpException (0x80004005): Could not load file or assembly 'tessnet2_32' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11700896
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +11532014

问题是,以前有没有人见过这个?处理好了吗?或者知道解决办法?

我已经尝试将tessdata文件夹移动到服务器上的bin文件夹,我已经确保tessnet2_32.dll文件和pdb文件在服务器上的bin文件夹中…

所有其他库也应该存在。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-05-23 21:26:13

服务器是64位进程,tessnet2_32.dll是32位进程。因此,您不能加载DLL并获得此异常。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10720859

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档