开发者

ASP.NET/Silverlight Control USB Device

I wa开发者_StackOverflow社区nt 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?


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜