avatar
t*r
1
在SERVER一端,想RUN一个EXE文件。
比如说,用户CLICK一个BUTTON,SERVER就LOAD一个EXE进行一系列的计算。怎么才能LOAD
这个执行文件?我用了SHELL,但是并不能真正的LOAD出来EXE。
avatar
st
2

System.Diagnostics.Process process=new System.Diagnostics.Process();

process.StartInfo.FileName = "xxxx.xxx";

process.StartInfo.WorkingDirectory = this.Server.MapPath(this.
TemplateSourceDirectory);

process.Start();
===============================
I used a batch file.. :D

【在 t*****r 的大作中提到】
: 在SERVER一端,想RUN一个EXE文件。
: 比如说,用户CLICK一个BUTTON,SERVER就LOAD一个EXE进行一系列的计算。怎么才能LOAD
: 这个执行文件?我用了SHELL,但是并不能真正的LOAD出来EXE。

avatar
t*r
3
Thanks.
你有没有现成的例子,给我看一看?
我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT
一端。我现在把图存下来,但是这样RUN的EXE存下来的图老是写着“Drawing Failed”,
单独RUN那个EXE就没问题,图好好的。

LOAD

【在 st 的大作中提到】
:
: System.Diagnostics.Process process=new System.Diagnostics.Process();
:
: process.StartInfo.FileName = "xxxx.xxx";
:
: process.StartInfo.WorkingDirectory = this.Server.MapPath(this.
: TemplateSourceDirectory);
:
: process.Start();
: ===============================

avatar
st
4
你那个程序怎么画的图?

【在 t*****r 的大作中提到】
: Thanks.
: 你有没有现成的例子,给我看一看?
: 我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT
: 一端。我现在把图存下来,但是这样RUN的EXE存下来的图老是写着“Drawing Failed”,
: 单独RUN那个EXE就没问题,图好好的。
:
: LOAD

avatar
t*r
5
也有可能是画图的问题。图是生成了一个FORM,把图放在FORM上,这个不知道是不是会影
响?另外,画图的SOFTWARE是以前的COM DLL,不过EXE是在。NET里面写的,图本身是画
得出来的。

我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT
Failed”,

【在 st 的大作中提到】
: 你那个程序怎么画的图?
avatar
t*r
6
另外,你LAUNCH一个EXE,EXE本身会跳出来吗?还是HIDE在那里?



我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT

【在 t*****r 的大作中提到】
: 也有可能是画图的问题。图是生成了一个FORM,把图放在FORM上,这个不知道是不是会影
: 响?另外,画图的SOFTWARE是以前的COM DLL,不过EXE是在。NET里面写的,图本身是画
: 得出来的。
:
: 我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT
: Failed”,

avatar
st
7
可以跳出来的,我记得。。。

【在 t*****r 的大作中提到】
: 另外,你LAUNCH一个EXE,EXE本身会跳出来吗?还是HIDE在那里?
:
: 影
: 画
: 我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT

avatar
m*t
8



Does your drawing exe need to access any other resources that are not
accessible from the account .net runs from? If it works when you log in and
run it, but doesn't from .net, it's usually because of different environments
or access rights.

【在 t*****r 的大作中提到】
: 也有可能是画图的问题。图是生成了一个FORM,把图放在FORM上,这个不知道是不是会影
: 响?另外,画图的SOFTWARE是以前的COM DLL,不过EXE是在。NET里面写的,图本身是画
: 得出来的。
:
: 我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT
: Failed”,

avatar
st
9
good one, we have serious problem for some components when accessing from
asp.net pages... it's just unstable, and usually part of operation will
fail due to lack of credential, so far some one here just wrote some
wrapper to call those components through a hosted environment, with
credential which can be set for the hosted wrapper in component service.. hehe

【在 m******t 的大作中提到】
:
: 影
: 画
: Does your drawing exe need to access any other resources that are not
: accessible from the account .net runs from? If it works when you log in and
: run it, but doesn't from .net, it's usually because of different environments
: or access rights.

avatar
t*r
10
thank both of you.
Access right was a problem which i considered and solved at the very beginning.
I do have other resources and ASPNET is a strict user by default.
Right now, it looks it is a problem of display. EXE can't pop out(st, you might
not remember it exactly), which causes my program can't save the graph
correctly.

【在 st 的大作中提到】
: good one, we have serious problem for some components when accessing from
: asp.net pages... it's just unstable, and usually part of operation will
: fail due to lack of credential, so far some one here just wrote some
: wrapper to call those components through a hosted environment, with
: credential which can be set for the hosted wrapper in component service.. hehe

avatar
st
11
check ProcessStartInfo.CreateNoWindow,
the default is false.
I saw the window back in the old days, maybe it was .net 1.0, which has
not that much security as .net 1.1... probably .net 1.1 suppressed this
window thing....
the user accesses your ASPNET application might be anonymous, I think...
at least that's what caused the problem here...

【在 t*****r 的大作中提到】
: thank both of you.
: Access right was a problem which i considered and solved at the very beginning.
: I do have other resources and ASPNET is a strict user by default.
: Right now, it looks it is a problem of display. EXE can't pop out(st, you might
: not remember it exactly), which causes my program can't save the graph
: correctly.

avatar
m*t
12

beginning.
might
Does the drawing program actually pops up a Windows window and draw in there?
Maybe change that to render on an in-memory image or something so it doesn't
have to paint on the screen? ;-)

【在 t*****r 的大作中提到】
: thank both of you.
: Access right was a problem which i considered and solved at the very beginning.
: I do have other resources and ASPNET is a strict user by default.
: Right now, it looks it is a problem of display. EXE can't pop out(st, you might
: not remember it exactly), which causes my program can't save the graph
: correctly.

avatar
t*r
13
right now, i had to write an application running background, and waiting for
message from web application. It works but looks ugly. :(

【在 st 的大作中提到】
: check ProcessStartInfo.CreateNoWindow,
: the default is false.
: I saw the window back in the old days, maybe it was .net 1.0, which has
: not that much security as .net 1.1... probably .net 1.1 suppressed this
: window thing....
: the user accesses your ASPNET application might be anonymous, I think...
: at least that's what caused the problem here...

avatar
t*r
14
yeah, our graphics package is not good (actually very bad, quinn -curtis 3.0).
there is no exposed function being able to have an image saved in the memory.
Anyway, we'll still have to use this package at least for a while.

【在 m******t 的大作中提到】
:
: beginning.
: might
: Does the drawing program actually pops up a Windows window and draw in there?
: Maybe change that to render on an in-memory image or something so it doesn't
: have to paint on the screen? ;-)

avatar
st
15
not necessarily ah... it sounds all right to me, just normal C/S app

【在 t*****r 的大作中提到】
: right now, i had to write an application running background, and waiting for
: message from web application. It works but looks ugly. :(

avatar
t*r
16
the problem is that it doesn't take fully advantage of ASP.NET.

【在 st 的大作中提到】
: not necessarily ah... it sounds all right to me, just normal C/S app
avatar
st
17
there's no "full advantage" of asp.net any way. glad it works. :D

【在 t*****r 的大作中提到】
: the problem is that it doesn't take fully advantage of ASP.NET.
avatar
t*r
18
thanks.

【在 st 的大作中提到】
: there's no "full advantage" of asp.net any way. glad it works. :D
avatar
G*T
19

maybe just use webservice.
anyway, as long as it works, it is ok.
nx ya

【在 t*****r 的大作中提到】
: thanks.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。