如何从ASP.NET Web服务访问Windows应用程序?

如何从ASP.NET Web服务访问Windows应用程序?

问题描述:

我正在使用一个Windows应用程序,用于从用户输入。我有一个要求,我必须开发一个Web应用程序/ Web服务,它将调用此Windows应用程序并打开一些Windows窗体并调用一个函数写入其中。



我使用asp.net进行Web服务,使用c#+ vb.net进行Windows应用程序。



注意: - 我无法将整个代码重写为asp .net这就是我寻找这种解决方案的原因。



让我解释一下。我不想在客户端运行我的应用程序。我在服务器上安装了webservice / web应用程序,并且在同一台服务器上也有windows应用程序。用户将请求从客户端系统执行Windows应用程序,此Web服务应仅在服务器上运行该Windows应用程序。对于我的情况,使用想要授权任何进程以便它向前移动,代码用于在Windows应用程序中编写,现在用户想要输出此进程执行。



I我将在目前管理身份验证,我坚持打开Windows应用程序并通过asp.net访问任何表单。



我尝试过:



我不知道该怎么办,怎么办,所以我还没有尝试过任何东西。我需要一些主题指导才能继续前进。

I am having one windows application which i am using to take entry from user. I am having one requirement in which i have to develop one web application/web service which will call this windows application and open some windows form and call one function written into it.

I am using asp.net for web service and c#+vb.net for windows application.

Note:- i can't rewrite whole code into asp.net that's why i am looking for such solution.

Let me explain it. I don't want to run my application on client end. I am having webservice/web application installed in server, and having windows application on same server too. User will request to execute windows application from client system and this webservice should run that windows application on server only. For my case use want to authorize any process so that it move forward, code for this is written in windows application, now user wants output of this process execution.

I will manage authentication at my end currently i am stuck to open windows application and access any form through asp.net.

What I have tried:

I don't know what to do and how to do,so i didn't tried any thing yet. I need some guidance of topic to move forward.

您无法从服务器在客户端计算机上运行应用程序:这绝对是来自安全点的禁止操作观点。交互(和应用程序)必须由用户在客户端启动并请求来自服务器的操作,而不是反过来。



想一想:如果您的服务器可以在您的PC上运行应用程序,以便恶意网站。想要访问一个在您的PC上运行勒索软件应用程序而不做任何事情的网站?我不知道......
You cannot run an application on a client machine from a server: that is absolutely a forbidden action from a security point of view. The interaction (and the application) must be started by the user on the client and request actions from the server, not the other way round.

Think about it: if your server could run an app on your PC so could malicious sites. Want to visit a site that runs a ransomware app on your PC without you doing anything? Becaue I don't...