可以与服务器上的其他应用程序交互的Web应用程序 [英] web app that can interact with other applications on the server

查看:72
本文介绍了可以与服务器上的其他应用程序交互的Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个将在我的家庭服务器上运行的Web应用程序,并希望能够让Web应用程序与另一个人进行交互,winforms

应用程序。例如,让我们说我想去一个aspx页面,点击一个名为打开记事本的

按钮,然后在服务器机器上我想要

让网络应用程序与我服务器上安装的服务进行交互,处理

执行不同的文件。


这有意义吗?

I want to make a web application that will run on my home server and would
like to be able to have the web application interact with another, winforms
application. For example, let''s say I wanted to go to an aspx page, click a
button called "open notepad", then on ther server machine I would like to
have the web app interact with a service installed on my server that handles
the execution of different files.

Does that makes sense?

推荐答案

我尝试执行shell命令,没有运气


private void Button1_Click(object sender,System.EventArgs e )

{

//打开记事本

试试

{

系统。 Diagnostics.Process proc = new System.Diagnostics.Process();

proc.EnableRaisingEvents = false;

proc.StartInfo.FileName =" notepad" ;;

proc.Start();

Response.Write(Process started ...);

}

catch(异常异常)

{

Response.Write(exception.ToString());

}

}


嗯......必须要有办法以某种方式做到这一点......任何人都有这个想法吗?


Steve" < ss*@sss.com>在留言中写道

新闻:Ol ************** @ tk2msftngp13.phx.gbl ...
I tried executing a shell command, no luck

private void Button1_Click(object sender, System.EventArgs e)
{
// open notepad
try
{
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName="notepad";
proc.Start();
Response.Write("Process started...");
}
catch(Exception exception)
{
Response.Write(exception.ToString());
}

}

Hmmm... there must be a way to do this somehow.. anyone have an idea?

"Steve" <ss*@sss.com> wrote in message
news:Ol**************@tk2msftngp13.phx.gbl...
我想做一个将在我的家庭服务器上运行的Web应用程序,并希望能够让Web应用程序与另一个
winforms应用程序进行交互。例如,让我们说我想去一个aspx页面,点击
a按钮,打开打开记事本,然后在服务器机器上,我想让网络应用程序与我的服务器上安装的服务是
处理不同文件的执行。

这有意义吗?
I want to make a web application that will run on my home server and would
like to be able to have the web application interact with another, winforms application. For example, let''s say I wanted to go to an aspx page, click a button called "open notepad", then on ther server machine I would like to
have the web app interact with a service installed on my server that handles the execution of different files.

Does that makes sense?



我把它包装在try块中,没有例外。

Start()的结果是真的。

这很奇怪,它什么也没做......


我已更改虚拟目录执行权限到脚本和

可执行文件

史蒂夫 < ss*@sss.com>在留言中写道

新闻:Ol ************** @ tk2msftngp13.phx.gbl ...
I have it wrapped in a try block, there are no exceptions. The result of
Start() is true.
This is weird, it just does nothing....

I have change the Virtual Directory "Execute Permissions" to "Scripts and
Executables"
"Steve" <ss*@sss.com> wrote in message
news:Ol**************@tk2msftngp13.phx.gbl...
我想做一个将在我的家庭服务器上运行的Web应用程序,并希望能够让Web应用程序与另一个
winforms应用程序进行交互。例如,让我们说我想去一个aspx页面,点击
a按钮,打开打开记事本,然后在服务器机器上,我想让网络应用程序与我的服务器上安装的服务是
处理不同文件的执行。

这有意义吗?
I want to make a web application that will run on my home server and would
like to be able to have the web application interact with another, winforms application. For example, let''s say I wanted to go to an aspx page, click a button called "open notepad", then on ther server machine I would like to
have the web app interact with a service installed on my server that handles the execution of different files.

Does that makes sense?



它的工作原理,notepad.exe只是立即退出并出现错误,因为它无法创建一个窗口。只有命令行应用程序可以从网络服务器运行


- 布鲁斯(sqlwork.com)


史蒂夫 < ss*@sss.com>在消息中写道

news:uM ************** @ TK2MSFTNGP10.phx.gbl ...
it works, notepad.exe just exits right away with an error because it cannot
create a window. only commandline apps can be run from a webserver

-- bruce (sqlwork.com)


"Steve" <ss*@sss.com> wrote in message
news:uM**************@TK2MSFTNGP10.phx.gbl...
我把它包裹起来一个试块,没有例外。
Start()的结果是真的。
这很奇怪,它什么也没做......

我已经更改了虚拟目录执行权限。 toScripts and
Executables

Steve < ss*@sss.com>在消息中写道
新闻:Ol ************** @ tk2msftngp13.phx.gbl ...
I have it wrapped in a try block, there are no exceptions. The result of
Start() is true.
This is weird, it just does nothing....

I have change the Virtual Directory "Execute Permissions" to "Scripts and
Executables"
"Steve" <ss*@sss.com> wrote in message
news:Ol**************@tk2msftngp13.phx.gbl...
我想创建一个将要使用的Web应用程序在我的家庭服务器上运行,
希望能够让Web应用程序与另一个,
I want to make a web application that will run on my home server and
would
like to be able to have the web application interact with another,


winforms


winforms

应用程序进行交互。例如,让我们说我想去一个aspx页面,
点击
application. For example, let''s say I wanted to go to an aspx page,
click


一个名为open notepad的


a

按钮,然后继续服务器机器我想让web应用程序与我服务器上安装的服务进行交互
button called "open notepad", then on ther server machine I would like to
have the web app interact with a service installed on my server that


处理

执行不同的文件。

这有意义吗?
the execution of different files.

Does that makes sense?




这篇关于可以与服务器上的其他应用程序交互的Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆