net页面运行Windows窗体应用程序

net页面运行Windows窗体应用程序

本文介绍了从asp.net页面运行Windows窗体应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我单击ASP按钮时,我想从ASP.net页运行Windows窗体应用程序。现在,我不想在ASP.net页面上显示该应用程序,正如我之前所说,我想启动它。

I want to run a Windows form app from ASP.net page when clicked on a ASP button. Now I don't want to show the app on ASP.net page, as I said earlier, I want to start it.

我正在直接在按钮后面调用Windows窗体应用程序,但是它无法正常工作并出现错误。当我搜索它时,我看到我们无法从ASP.net页面调用/运行Windows窗体应用程序。那么,谁能给一个更好的主意来完成这项任务呢?

I'm calling the Windows form app directly behind a button but it is not working and giving errors. when I searched for it, I saw that we cannot call/run windows form app from ASP.net page. So any one who can give a better idea to achieve this task?

客户端/服务器技术怎么样?这样,当我从客户端(ASP.net页)向服务器(Win Form应用程序)传递消息时,该应用程序应运行。

How about Client/server technique? So that when I pass a message from client (ASP.net page) to server (Win Form App), the app should run.

请帮助!

推荐答案

如果要从网页启动WinForms应用,最好的方法可能是使用ClickOnce技术。它允许您直接通过网页发布应用程序(不需要单独的安装程序)。

If you want to launch the WinForms app from a web page, the best approach is probably to use ClickOnce technology. It allows you to publish your application directly through a web page (no separate installer needed).

ClickOnce也可以与C ++应用程序一起使用,但是还有一些其他步骤

ClickOnce also works with C++ apps, but there are some additional steps

Stack Overflow有一个很好的答案,它回顾了一些需要注意的事情。建议您也仔细阅读

There's an excellent answer on Stack Overflow that reviews some things to be aware of. Suggest you read through that as well

如果要从网页启动应用程序(可能包括参数),一种方法是让应用程序注册一个协议处理程序。协议处理程序允许应用程序使用您定义的新协议对URL做出反应,例如myappname:// TheFileToOpen

If you want to launch your application (possibly including parameters) from a web page, one approach is to have the application register a protocol handler. A protocol handler allows an application to react to a URL with a new protocol that you define, e.g. myappname://TheFileToOpen

这篇关于从asp.net页面运行Windows窗体应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 07:12