【问题标题】:Secugen Fingerprint scanner with ASP.NET website带有 ASP.NET 网站的 Secugen 指纹扫描仪
【发布时间】:2014-03-18 20:13:25
【问题描述】:

我一直致力于将 Secugen 指纹读取器和 API 实现到一个 ASP.NET 网站中,用于无家可归者收容所,这让我发疯了。我正在使用适用于 Windows API 的 FDx SDK Pro,并且我有自定义 COM 组件(通过 OCX 文件)将 activeX 控件导入我的工具箱。但是,这些控件只能在我创建 Windows 应用程序然后创建 Windows 窗体时使用。我需要在 Web 表单中包含这些控件。如果我尝试将它们放在网络表单中,activeX 工具将显示为灰色,并且不允许我这样做。 .htm 有一个例子,它完全符合我的要求,所以我知道这是可能的,但我就是不知道依赖项是什么。我只是不熟悉 .NET 和程序集库。这是 API 附带的自述文件,其中包含它拥有的不同文件。我不确定是否必须先创建一个 Windows 窗体,然后将其作为对象放入我的网站。我试图将“SecuGen.FdxSdkPro.Windows.dll”文件放入我的 bin 文件夹中,但是当我运行它时,当我运行它时出现以下错误。任何输入都将不胜感激,如果上传 .htm 示例或提供代码有什么用处,请告诉我。

编译错误

Could not load file or assembly 'SecuGen.FDxSDKPro.Windows' or one of its dependencies. An attempt was made to load a program with an incorrect format. 
  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.BadImageFormatException: Could not load file or assembly 'SecuGen.FDxSDKPro.Windows' or one of its dependencies. An attempt was made to load a program with an incorrect format.

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 'SecuGen.FDxSDKPro.Windows' could not be loaded.



=== Pre-bind state information ===
LOG: DisplayName = SecuGen.FDxSDKPro.Windows
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: SecuGen.FDxSDKPro.Windows | Domain ID: 5
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///f:/Documents/GitHub/Homeless_Intake/WebSite1/
LOG: Initial PrivatePath = f:\Documents\GitHub\Homeless_Intake\WebSite1\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: f:\Documents\GitHub\Homeless_Intake\WebSite1\web.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\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:/Users/Farr/AppData/Local/Temp/Temporary ASP.NET Files/website1/66e0b9e8/94cdddbc/SecuGen.FDxSDKPro.Windows.DLL.
LOG: Attempting download of new URL file:///C:/Users/Farr/AppData/Local/Temp/Temporary ASP.NET Files/website1/66e0b9e8/94cdddbc/SecuGen.FDxSDKPro.Windows/SecuGen.FDxSDKPro.Windows.DLL.
LOG: Attempting download of new URL file:///f:/Documents/GitHub/Homeless_Intake/WebSite1/bin/SecuGen.FDxSDKPro.Windows.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.



Stack Trace: 



[BadImageFormatException: Could not load file or assembly 'SecuGen.FDxSDKPro.Windows' 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, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +34
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +16
   System.Reflection.Assembly.Load(String assemblyString) +28
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +38

[ConfigurationErrorsException: Could not load file or assembly 'SecuGen.FDxSDKPro.Windows' 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) +752
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +218
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +170
   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +91
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +285
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +516

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

适用于 Windows 的 FDx SDK Pro 版权所有 (C) 1998-2014 SecuGen Corporation

版本:3.7 日期:2013 年 11 月


从 v3.54 更改

  • 支持 SecuGen U20 (FDU05) 设备。
  • 支持 WBF 驱动程序(Windows 7 或更高版本)。
  • 删除 Visual Stdio 6.0 的示例
  • 错误修复#1:CreateFPObject()/DestroyFPMObject() 的内存泄漏。
  • 错误修复#2:导出函数的命名问题。

日期:2009 年 7 月


从 v3.53 开始的变化

  • SDK 许可已更新
  • 已添加 EnableCheckOfFingerLiveness() 及其示例 (DeviceTest.exe)
  • 不需要安装的 S/N

版本:3.53 日期:2009 年 1 月


v2.5 的变化

  • 支持 x64 位平台,包括 .NET 2.0 (运行时 dll、库文件、示例程序)
  • 支持 ActiveX 控件
  • 为 activeX 控件添加新示例:Visual Basic 和 HTML 示例
  • 支持 ISO 19794-2 模板
  • sgfplib.dll 已更新

系统要求

SecuGen USB 端口设备(FDU02、FDU03、FDU04、FDU05 或 U20): - IBM 兼容的 PC 486 或更高版本 - 光盘驱动器 - 1 个 USB 2.0 端口 - 64MB 内存 - 80MB 可用硬盘空间 - Microsoft Windows 98 SE、Windows ME、Windows 2000/XP/2003、Windows Vista、 Windows 7、8、8.1


文件和目录结构

Windows 系统目录 - sgfplib.dll(FDx SDK Pro 主模块) - sgfpamx.dll(FDx SDK Pro算法模块,MINEX认证)

Bin\i386 目录 - sgfplib.dll - sgfpamx.dll - sgfplibx.ocx

Bin\x64 目录 - sgfplib.dll - sgfpamx.dll - sgfplibx.ocx

公司目录 - sgfplib.h

Lib\i386 目录 - sgfplib.lib

Lib\x64 目录 - sgfplib.lib

样本目录 - 在 Visual Studio 2005 中编写的图像捕获示例 - 在 Visual Studio 2005 中编写的匹配示例 - 在 Visual Studio 2005 中编写的 ANSI-378 模板的匹配示例 - Visual Studio 2005 中 ISO 19794-2 模板的匹配示例

DotNet\Bin\i386 目录 - SecuGen.FdxSdkPro.Windows.dll(FDx SDK Pro .NET x86 库)

DotNet\Bin\x64 目录 - SecuGen.FdxSdkPro.Windows.dll(FDx SDK Pro .NET x64 库)

DotNet\Samples 目录 - 用 C# (Visual Studio 2005) 编写的匹配示例 - 显示用 C# (Visual Studio 2005) 编写的 ANSI 378 模板用法的匹配示例 - 用 Visual basic .NET (Visual Studio 2005) 编写的匹配示例

【问题讨论】:

  • 顺便说一下我用的是vb语言。
  • 只是为了跟进,我现在实际上有这个工作。可以让指纹扫描仪通过 Internet 与客户端/服务器模型一起工作。我们最终不得不使用 VPS 主机才能正确安装 sdk。如果您发现自己需要帮助,请随时给我发消息。
  • 你是怎么做到的?
  • 你是如何让 .Net FW 4 工作的?
  • @Neoryder,你有没有让它工作?

标签: .net api visual-studio-2012 fingerprint


【解决方案1】:

确保您的应用程序是在 32 位平台目标中构建的

【讨论】:

    【解决方案2】:

    我不小心有两个帐户。首先是肯定的,您必须确保将 SDK 安装在正确的位服务器上。我最终采用了 active-x 控件并将它们嵌入到 Web 表单中。然后当指纹被捕获并将其转换为通过ajax发送到服务器的字符串。

    然后我遇到了一个问题,即 SDK 没有正确解密字符串以进行比较的功能。我联系了 Secugen,他们非常乐意将我的请求提交给工程师,然后工程师向我提供了另一个包含缺失功能的 .dll 文件。有一天,我可能会在 GitHub 上发布一些源代码。当我这样做时,我会用链接更新这个!

    【讨论】:

      【解决方案3】:

      如果您在 Windows 应用程序中遇到此问题,尤其是在生产环境中,请检查是否安装了 microsoft c++ redistributable。必须安装 2015 才能正常工作。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-05
        • 2017-03-24
        • 1970-01-01
        相关资源
        最近更新 更多