当前位置: 动力学知识库 > 问答 > 编程问答 >

activex - Accessing a USB device from ASP.NET MVC

问题描述:

I would like my web application (which runs on intranet only) to be able to interface with a USB finger print device, that captures the fingerprint of a user through an enrollment web application

I tried googling, but it seems that the only viable way is Active X, which, from what I've read, is supported on IE only.

Is there a solution/work around/crude hack, that allows me to interface with a USB device, that works across all browsers?

I can accept the following conditions:

  1. prompting to install 3rd party files/active x/etc
  2. security doesn't concern me as this is used on intranet only

网友答案:

How about writing a browser plugin? For example, Chrome developer documentation has information on Accessing Hardware Devices, with an API for specifically accessing USB devices.

You could then use a Content Script to interact with your page, for example, replacing an <input type="fingerprint" /> element with your fingerprint scanning UI (eg. show an image of scanned print). I don't know the details of the UX you're trying to achieve so it's hard to say.

Another way would be to generate a windows.fingerprintScanned event (which you'd also do with a Content script and message passing), which you could then handle in your regular javascript page code from the app server.


The downside to the browser extension is that it's more specialized: if you want a Firefox or IE plugin, you'd have to write for those specifically. Just putting this out as an alternative to Flash/Silverlight/Java (which are cross-browser but have their own downsides).

网友答案:

How about a Silverlight trusted application?

Edit- Also, as a side note, I believe security should always be a concern, because of things like pivot attacks and social engineering.

网友答案:

Hack I don't know, but you can do your web app send something to a queue and install a client that read the data from this queue. You understand?

分享给朋友:
您可能感兴趣的文章:
随机阅读: