Secugen指纹扫描仪与ASP.NET网站

时间:2014-03-18 20:13:26

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

我一直致力于将Secugen指纹识别器和API实现到一个ASP.NET网站,用于无家可归者收容所,这让我感到疯狂。我正在使用FDx SDK Pro for Windows API,我有自定义COM组件(通过OCX文件)将activeX控件导入我的工具箱。但是,只有在创建Windows应用程序然后创建Windows窗体时才能使用控件。我需要在Web表单中使用这些控件。如果我尝试将它们放在webform中,那么activeX工具会变灰并且它不会让我感觉不舒服。有一个例子,.htm正是我正在寻找的东西,所以我知道它是可能的,但我不能告诉依赖是什么。我只是不熟悉.NET和汇编库。以下是API附带的自述文件,其中包含它具有的不同文件。我不确定是否必须首先创建Windows表单然后将其作为对象放入我的网站。我试图把#34; 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的样本
  • Bug-fix#1:CreateFPObject()/ DestroyFPMObject()的内存泄漏。
  • 错误修复#2:导出函数的命名问题。

日期:2009年7月


从v3.53

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

版本:3.53 日期:2009年1月


从v2.5

的变化
  • 支持包括.NET 2.0在内的x64位平台 (运行时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 RAM - 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

Inc目录 - 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#编写的ANSI 378模板用法(Visual Studio 2005) - 匹配使用Visual Basic .NET(Visual Studio 2005)编写的示例

2 个答案:

答案 0 :(得分:2)

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

中构建的

答案 1 :(得分:0)

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

然后我遇到了一个问题,即SDK没有正确解密字符串以进行比较的功能。我联系了Secugen,他们很高兴我向工程师提出了我的请求,然后工程师向我提供了另一个包含缺失函数的.dll文件。其中一天我可能会在GitHub上发布一些源代码。当我这样做时,我将通过链接更新此内容!