如何从网站在客户端上执行应用程序?

发布于 2024-12-11 02:41:18 字数 739 浏览 0 评论 0原文

我有一个位于服务器上的 ASP.NET / C# 应用程序,我的问题是如何在访问该网站的客户端(服务器上的应用程序)中运行另一个应用程序 (.exe)

问题

(client)------------(server)
run browser         website 
   and              (asp.net/c#)
**execute           instruction     
app.exe**           for execute app.exe 

我开发了ext.net,一个使用asp.net + c#的软件,它是powerbuilder制作的旧软件的更新版本(v2是新软件,v1是powerbuilder软件)。 V2 没有 V1 包含的所有功能,因此执行 V2 后,我必须执行 V1。所以如果用户在浏览器上使用V2,我应该能够打开V1(V2位于服务器中,V1安装在客户端中。因为客户端打开浏览器来连接到V2)。

*使用 google

desarrollé un software en ext.net(asp+c#) 进行翻译,该版本是 PowerBuilder 之前的其他软件的实际版本(分别为 llamaré v2 和 v1)。由于当时,软件 V2 与 V1 的功能没有任何关系,因此,V2 的程序将在 V1 中完成。 Vale decir, estando en el browser usando V2 debiera poder abrir V1 (.exe)

I have a application in ASP.NET / C# located on a server, my problem is how to run another application (.exe) but in the client that visit the website (the application on server)

question

(client)------------(server)
run browser         website 
   and              (asp.net/c#)
**execute           instruction     
app.exe**           for execute app.exe 

I developed ext.net, a soft using asp.net + c# which is an updated version of an old soft made in powerbuilder (v2 is the new soft, v1 is the powerbuilder one). V2 has not all the functionality included on V1, so after executing V2, I have to execute V1. so if the user is using V2 on the browser, I should be able to open V1 (V2 is located in a server, V1 installed in client. Since client opens browser to connect to V2).

*translated with google

desarrollé un software en ext.net(asp+c#) el cual es una version actualizada de otro software anterior hecho en PowerBuilder (los llamaré v2 y v1 respectivamente). Por razones de tiempo, el software V2 no tiene todas las funcionalidades de V1, por lo cual, al finalizar el procedimiento con V2 se debe abrir V1. Vale decir, estando en el browser usando V2 debiera poder abrir V1 (.exe)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

挽心 2024-12-18 02:41:18

不幸的是,由于安全原因,这是不可能的。如果可能的话,黑客可能会对客户端计算机造成严重破坏。但是,您也许可以在旧版 IE 上使用 ActiveX。这可能需要将安全设置降低到最低限度。无论如何,链接如下:

http://www.governmentsecurity.org/forum/index .php?showtopic=23488

It is, unfortunately, not possible due to security reasons. Had it been possible, hackers could have created havoc on client machines. However, you may be able to, may be, on older IE version using ActiveX. This may require lowering the security setting to bare minimum. Here's the link any way:

http://www.governmentsecurity.org/forum/index.php?showtopic=23488

海风掠过北极光 2024-12-18 02:41:18

应用的目的是什么,点击一次或许就能解决。

http://msdn.microsoft.com/en -us/library/t71a733d(v=vs.80).aspx

事实上你不能直接从浏览器执行代码并不是不幸的事情,这是一个很好的安全性 特征。

What is the purpose of the application, click once may be a solution .

http://msdn.microsoft.com/en-us/library/t71a733d(v=vs.80).aspx

The fact you cannot execute code directly from a browser is no unfortunate thing, it is a wonderful security feature.

时光清浅 2024-12-18 02:41:18

在这个方向上你唯一能做的就是提供一个指向应用程序的链接,以便用户可以决定单击它、下载文件并在本地执行它。

显然 Sys Internals 是这样做的,请检查此处: Windows SysInternals

但实际上他们的实时服务只是提供您可以访问此页面的链接:http://live.sysinternals.com/,然后您可以从中下载并本地执行。

the only thing you can do in this direction is give a link to the application so that the user can decide to click on it, download the file and execute it locally.

Apparently Sys Internals does this, check here: Windows SysInternals

but in fact their live service simply gives you the link to this page: http://live.sysinternals.com/ from where you can then download and execute locally.

明媚如初 2024-12-18 02:41:18

我们需要有关您的 exe 需要执行的操作的更多详细信息,因为它将影响您使用的技术,但执行您想要执行的操作的正确方法是:

  1. 使用 ActiveX。让用户安装您的 ActiveX 控件一次,您就可以从那时起运行它。 ActiveX 基本上是在客户端计算机上为您运行一个 DLL。它存在一些沙盒限制,并且正在失宠,因为它仅适用于 IE,而且越来越多的互联网不使用 IE。
  2. 使用银光。这将更容易编程,并且更像您所熟悉的。然而(我认为)它比 ActiveX 有更多的沙箱限制,但它支持跨浏览器和跨平台。

Microsoft 一体化代码框架 提供了 ActiveX 和 Silverlight 的示例。我建议尝试 一体化示例浏览器 它有点混乱边缘但它有效。 还有一个 VS2010 扩展,但它不适用于VS2010 的 Express 版本或 VS2008。

有关如何为网页设置 ActiveX 的简单示例,请参阅示例 HTMLEmbedActiveX 。我不知道具体的 silverlight 示例可以向您指出。

请在您的主要帖子中提供更多详细信息,说明您实际尝试在客户端执行的操作,我可以告诉您其中一种方法是否有效。

We need more details on what your exe needs to do as it will affect the technology you use but the correct way to do what you want to do is either:

  1. Use ActiveX. Have the user install your ActiveX control once and you will be able to run it from then on. ActiveX is basically running a DLL on the client computer for you. There are some sand-boxing limitations and it is falling out of favor as it is IE only and a larger and larger % of the internet is not using IE.
  2. Use Silverlight. This will be easier to program with and will be more like what you are familiar with. However (I think) it has more sandbox limitations than ActiveX, but it is cross browser and cross platform supported.

The Microsoft All-In-One Code Framework has examples of both ActiveX and Silverlight. I reccomend trying the All-In-One Sample Browser it's a little ruff around the edges but it works. There is a VS2010 extension too but it does not work with the express version of VS2010 or with VS2008.

For a simple example on how to set up ActiveX for a web page see the example HTMLEmbedActiveX. I do not know a specific silverlight example to point you to.

Please provide more details in your main post of what you are actually trying to do on the client side and I can tell you if one of these methods will work.

橙味迷妹 2024-12-18 02:41:18

@Scott Chamberlain:这就是我能够解释原始问题的方式:

我有一个在服务器上运行的 ASP.NET / C# 应用程序。我想要的是运行其他应用程序(.EXE),但是在访问有问题的服务器的客户端

问题

(client)------------(server)
run browser         website 
   and              (asp.net/c#)
**execute           instruction     
app.exe**           for execute app.exe 

该应用程序是在 EXT.NET (ASP + C#) 中开发的,这是一个更新版本另一个在 PowerBuilder 中构建的旧应用程序。 (我们分别称它们为V2v1)。

目前,V2 具有 V1 的所有功能,因此在程序结束时应打开 V1 和 V2。也就是说,在同时使用V1和V2的浏览器中应该能够在客户端上打开.EXE。

我无法完全理解最后一段

@Scott Chamberlain: This is how I have been able to interpret the original question:

I have an application in ASP.NET / C# running on a server. What I want is to run other application (.EXE), but on the client who visit the server in question

question

(client)------------(server)
run browser         website 
   and              (asp.net/c#)
**execute           instruction     
app.exe**           for execute app.exe 

The application has been developed in EXT.NET (ASP + C#) which is an updated version of another old application built ​​in PowerBuilder. (Lets call them V2 and v1 respectively).

For the time being, the V2 has all the features of V1, so at the end of the procedure should be opened V1 and V2. That is, in the browser using both V1 and V2 should be able to open .EXE on the client.

I could not understand the last paragraph completely

画骨成沙 2024-12-18 02:41:18

如果您将 V1 应用程序定义为 URL 处理程序,那么您可以从任何最新的 Web 浏览器调用它。无需 ActiveX!

这很完美。我将它用于从 Web 应用程序到正在运行的 PB win32 应用程序的应用程序到应用程序链接。我有一个单独的 PB win32 应用程序作为 URL 处理程序。 URL 处理程序查找正在运行的应用程序。如果它找到正在运行的应用程序,则会向该主应用程序发送一个事件。否则,它会启动主应用程序,将命令作为命令行参数从网站发送。效果完美!

If you define your V1 application as a URL handler then you can call it from any recent web browser. No need for ActiveX!

This works perfect. I use it for app-to-app links from web applications into a running PB win32 application. I have a separate PB win32 app acting as the URL handler. The URL handler looks for the running application. If it finds the running application it sends an event to that main application. It it doesn't it starts the main application sending the command from the web site as a commandline argument. Works perfect!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文