What should I do to enable my ASP.NET MVC app can "talk" to a card reader via a USB port? It works perfectly with a Windows form app and all I did was copy the dll file to a folder in the bin/Debug folder and do the necessary DllImport moves since it was written in C++ most likely. With this desktop app I could write to the card, read it, reset it, etc.

I did the same [copy the dlls into the bin folder and fully referenced the dll in one of the MVC controllers] all to no avail. I realize the MVC app runs inside a browser, so how do I go about implementing this scenario? Can I use a web service to expose the functionality of the desktop app?

Furthermore, I wish to try Silverlight 5 against this background VS2012/Win 8. I proceeded to add a SL app to my MVC solution and output the xap in Client Bin of the MVC proj. Didn't work until I ran it under out of browser setting. However, it looks like a separate application since the user has to download and install the app and can run it separately from the MVC app which it should be a part of. I want it to run INSIDE the browser and yet still be able to talk to a card reader plugged to a USB port on the client machine i,e. my machine for now. I hope I have not succeeded in confusing you but if I have I can explain some more I promise. Thanks.