几天前,我为我正在开发的一个网络系统购买了一个惠生OR200传感器。
我使用了发送给我企业的SDK,并在一个窗口应用程序中进行了测试,工作正常,但我需要将其集成到web应用程序中,但我不知道如何做到这一点。
这是windows窗体应用程序:
WisSensorN WisObj = new WisSensorN(); // instance of wison object表单中的对象:
private System.Windows.Forms.Button Enroll;
private System.Windows.Forms.Button Identify;
private System.Windows.Forms.PictureBox FingerPic;
private System.Windows.Forms.Button Stop;
private System.Windows.Forms.TextBox Status;Load method() //Open()指纹需要.DataEvent和SetDisplay
private void Form1_Load(object sender, EventArgs e)
{
WisObj.Open();
WisObj.DataEvent += new _IWisSensorNEvents_DataEventEventHandler(WisObj_DataEvent);
WisObj.SetDisplay((int)FingerPic.Handle);
// i can´t do WisObj.SetDisplay((int)FingerPic.Handle) on mvc web app
// because i can't get FingerPic object from view.
}
private void WisObj_DataEvent(WisSensorNLibLib.DATA data, string str)
{
switch (data)
{
case DATA.DATA_ENROLL:
// save the base 64 string of finger image
break;
case DATA.DATA_IDENTIFY_CAPTURE:
//validation
break;
case DATA.DATA_VERIFY_CAPTURE:
break;
}
}
private void Enroll_Click(object sender, EventArgs e)
{
WisObj.StartEnroll(); // it used for save the fingerprint
}
private void Identify_Click(object sender, EventArgs e)
{
WisObj.IdentifyCapture();
// it used to activate the sensor. When i did this on controller action,
// nothing happen. This is because the property setDisplay was not set
}有什么建议吗?我能做什么?
我问我在哪里买指纹识别器的公司有没有网络应用软件开发工具包,但没有回答。
请帮帮我!
太棒了!
发布于 2012-06-01 17:06:51
我认为你走在一条非常错误的道路上。你不能简单地从浏览器中使用设备。在浏览器中运行的HTML/javascript“应用程序”无法连接到任何本地资源,如I/O端口或Windows事件。您将需要特殊的技术,如ActiveX或Java applet来与客户端机器上的设备进行通信。
无论你的网站是MVC,还是普通的ASP.NET,甚至PHP都无关紧要。如果你不知道ActiveX (和校友)是用来做什么的,也不知道它有什么缺点,你应该寻找一位专业人士,他可以帮助你解释情况,并可能开发出合适的解决方案。
https://stackoverflow.com/questions/10833877
复制相似问题