简体   繁体   中英

How can I call a win app on client machine from my aspx web page?

I want to call a windows application on my clients machine from my aspx page , and If It's possible I want to send some parameter to the application . Any guids ?

The only way you can do that is to custom-develop an ActiveX control and host that control in your page. Then the user would have to allow ActiveX controls in his browser. Normally, a browser is a sandbox, so you cannot access Windows from it... But with ActiveX, this is possible.

Here is a tutorial for developing ActiveX controls in C#: http://haseebakhtar.wordpress.com/2011/05/31/creating-an-activex-control-in-net-using-c/

Of course you can still use the old way, that is VB6 or C++...

You may use Shell API in javascript to invoke your windows application. This works only in Internet explorer browser. You need to make sure that your browser security settings (At client) is also changed to " run activex controls "

Here is a sample.

I don't know the specific details, but this might point you in the right direction.

For instance, some IRC applications react when you click a link whose target is irc://some.host.com

Same goes for textmate application for mac:

txmt://open?«arguments»

This, however, is only possible if the target application has registered a custom URL schema in the user's machine. Furthermore, the User has to allow access to it.

You could write a ClickOnce application that you can launch from the web page.

If you make it a full-trust application, you can use it to launch the local Windows application. You can pass arguments to the ClickOnce application, which can parse them and pass them on to the local Windows application.

Alternatively, if you are the author of the local Windows application (and if it is C#/.Net) then you could make the Windows application itself a ClickOnce application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM