ASP.NET/Silverlight Control USB Device

二次信任 提交于 2019-12-10 10:06:19

问题


I want to alert a user of a new message using some kind of USB device (e.g. a flashing light). Is it possible to control a USB device from ASP.NET or Silverlight?


回答1:


You could possibly do this using a custom ActiveX component and som javascript in your webpage.

Alternatively you could use a Silverlight 4 application running in out-of-browser mode, but that is probably not what you want. SL4 can access locally installed Com components it is is running in out-of-browser mode, so in that case this should be realtively easy to do.




回答2:


ASP.NET will need the assistance of a client side technology so the question of "can this be done from ASP.NET?" is irrelevent.

Whether it makes sense to use Silverlight is slightly more relevent. The only scenario where it might even be feasable would be that the USB device in question is known to already be installed and has a COM based API. You are willing to use Silverlight 4. The silverlight application can be installed with elevated trust and run out-of-brower.

It seems excessive when instead you could probably build a tight little ActiveX component marked Safe for scripting and get the user to install that instead.




回答3:


I think it's unlikely you'll be able to do this. Trusted applications in Silverlight 4 may possibly be able to do this, this would be in the out of browser install only if possible and I think it's unlikely though.

http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx#elevated

Otherwise you don't have that much access to a users system so I don't think you could do it with these technologoies alone.



来源:https://stackoverflow.com/questions/2085408/asp-net-silverlight-control-usb-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!