Connecting Silverlight to the local computers COM port

前端 未结 10 823
清酒与你
清酒与你 2021-01-14 06:53

I have been searching high and low for a way to get my silverlight application talking to the COM port on my local computer. Has anybody out there been able to get Silverli

相关标签:
10条回答
  • 2021-01-14 07:17

    I think the guys have summed it up nicely - Silverlight is in a tight sandbox and you will not get access to the COM port or other local resources.

    So let's start to think about alternatives:

    • Use ClickOnce and a full .NET application - Gives you easy deployment and udpates, and you will have the full power of the .NET framework.
    • Use a XBAP (Browser Deployed WPF) that requests some extra permissions. Would live inside the browser, but only run on Windows machines with .NET 3.0 / 3.5 installed
    • Write an ActiveX control that talks to the GPS device and expose an API. Then use JavaScript to consume this API and interact with the JavaScript code from Silverlight. This would give you a in-browser GPS application, but your users would have to install an additional GPS ActiveX component.

    Cheers, Jonas

    0 讨论(0)
  • 2021-01-14 07:27

    This can not be done with Silverlight.

    Why not just use a standard .NET desktop app? If you need to easily deploy over the web, just use Click-Once for deployment.

    0 讨论(0)
  • 2021-01-14 07:27

    By local computer do you mean the computer the silverlight client app is running on? Silverlight runs in a security sandbox, and it is doubtful you can connect to hardware resources like so.

    0 讨论(0)
  • 2021-01-14 07:28

    Jon,

    I am actually trying to read my GPS from Silverlight. I have an interesting concept that I wanted to try out, but I was trying to go for a zero install footprint.

    0 讨论(0)
提交回复
热议问题