views:

94

answers:

3

Hello.. basically, I am needing to execute a program on the viewers computer through a website. This program must be capable of talking to device drivers however, which makes it an unlikely candidate for activex. The website will only be used by clients(as in, it's not a public site) so having to change security settings isn't too big of a deal.

Also, we could possibly have them install an application on their computer, and then when they click a button on the website this activex control just executes the application they already installed to avoid device driver problems..

Does anyone have any ideas on how to do this well? I have a feeling activex won't just let you arbitrarily execute local applications. Also, it is preferred to be possible to do without certificates and signing(though it will eventually be over https)

(it's only tagged C# because that's the programming language to be used on both the client and server)

A: 

It sounds like you will have control over the client and server sides, so why not use WCF and set up the client application to connect to the server via a duplexed communication. On the server side keep a list of the clients that have connected to it and then when you need to trigger the client side code it will iterate over the list of clients and send the message to execute the code. And when the client disconnects it will be unregistered from the server.

See this link for more information on the duplex services.

Agent_9191
Wouldn't that involve on the client for a port to be open(as if for a server)? This is something we can't do because there will be many people using the same website in the same building, and port forwarding only works to 1 computer if (like most people) you only have 1 IP
Earlz
You can use HTTP Duplexing to allow it over port 80. As far as I remember, that doesn't require additional ports to be opened as it creates a callback channel implicitly.
Agent_9191
interesting.. I'll look into if it could work for us
Earlz
A: 

Also, we could possibly have them install an application on their computer, and then when they click a button on the website this activex control just executes the application they already installed to avoid device driver problems..

Ding ding. That's pretty much what you'll have to do.

Joel Coehoorn
yes, but can you execute any local program(and possibly scan registry) from an activex control?
Earlz
You may have to write your own activeX control as well, digitally sign it, and get your users to accept the certificate, but I believe this is possible.
Joel Coehoorn
doesn't digitally signing require a pretty good amount of money? Is making an unverified certificate possible?
Earlz
I don't know. I expect you could use an unverified certificate. It's still a digital signature. But your off in uncharted waters here for me.
Joel Coehoorn
+1  A: 

If you only need to tell the application to simply launch or launch with certain data, you can look into registering a protocol handler and create links, that the user can click, similar to myapp://the/data/you/need/to/send.

Chris Martin
wow. thats like exactly what I've been needing..
Earlz