t*****r 发帖数: 47 | 1 在SERVER一端,想RUN一个EXE文件。
比如说,用户CLICK一个BUTTON,SERVER就LOAD一个EXE进行一系列的计算。怎么才能LOAD
这个执行文件?我用了SHELL,但是并不能真正的LOAD出来EXE。 |
st 发帖数: 1685 | 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 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 在SERVER一端,想RUN一个EXE文件。 : 比如说,用户CLICK一个BUTTON,SERVER就LOAD一个EXE进行一系列的计算。怎么才能LOAD : 这个执行文件?我用了SHELL,但是并不能真正的LOAD出来EXE。
|
t*****r 发帖数: 47 | 3 Thanks.
你有没有现成的例子,给我看一看?
我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT
一端。我现在把图存下来,但是这样RUN的EXE存下来的图老是写着“Drawing Failed”,
单独RUN那个EXE就没问题,图好好的。
LOAD
【在 st 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : System.Diagnostics.Process process=new System.Diagnostics.Process(); : : process.StartInfo.FileName = "xxxx.xxx"; : : process.StartInfo.WorkingDirectory = this.Server.MapPath(this. : TemplateSourceDirectory); : : process.Start(); : ===============================
|
st 发帖数: 1685 | 4 你那个程序怎么画的图?
【在 t*****r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Thanks. : 你有没有现成的例子,给我看一看? : 我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT : 一端。我现在把图存下来,但是这样RUN的EXE存下来的图老是写着“Drawing Failed”, : 单独RUN那个EXE就没问题,图好好的。 : : LOAD
|
t*****r 发帖数: 47 | 5 也有可能是画图的问题。图是生成了一个FORM,把图放在FORM上,这个不知道是不是会影
响?另外,画图的SOFTWARE是以前的COM DLL,不过EXE是在。NET里面写的,图本身是画
得出来的。
我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT
Failed”,
【在 st 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 你那个程序怎么画的图?
|
t*****r 发帖数: 47 | 6 另外,你LAUNCH一个EXE,EXE本身会跳出来吗?还是HIDE在那里?
影
画
我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT
【在 t*****r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 也有可能是画图的问题。图是生成了一个FORM,把图放在FORM上,这个不知道是不是会影 : 响?另外,画图的SOFTWARE是以前的COM DLL,不过EXE是在。NET里面写的,图本身是画 : 得出来的。 : : 我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT : Failed”,
|
st 发帖数: 1685 | 7 可以跳出来的,我记得。。。
【在 t*****r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 另外,你LAUNCH一个EXE,EXE本身会跳出来吗?还是HIDE在那里? : : 影 : 画 : 我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT
|
m******t 发帖数: 2416 | 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 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 也有可能是画图的问题。图是生成了一个FORM,把图放在FORM上,这个不知道是不是会影 : 响?另外,画图的SOFTWARE是以前的COM DLL,不过EXE是在。NET里面写的,图本身是画 : 得出来的。 : : 我依照你的方法试了试,好象和用SHELL的结果是一样的。主要是要画个图,传回CLIENT : Failed”,
|
st 发帖数: 1685 | 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 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : 影 : 画 : 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 发帖数: 47 | 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 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 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
|
|
|
st 发帖数: 1685 | 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 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 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.
|
m******t 发帖数: 2416 | 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 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 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.
|
t*****r 发帖数: 47 | 13 right now, i had to write an application running background, and waiting for
message from web application. It works but looks ugly. :(
【在 st 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 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 发帖数: 47 | 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 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : 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? ;-)
|
st 发帖数: 1685 | 15 not necessarily ah... it sounds all right to me, just normal C/S app
【在 t*****r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : right now, i had to write an application running background, and waiting for : message from web application. It works but looks ugly. :(
|
t*****r 发帖数: 47 | 16 the problem is that it doesn't take fully advantage of ASP.NET.
【在 st 的大作中提到】![](/moin_static193/solenoid/img/up.png) : not necessarily ah... it sounds all right to me, just normal C/S app
|
st 发帖数: 1685 | 17 there's no "full advantage" of asp.net any way. glad it works. :D
【在 t*****r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : the problem is that it doesn't take fully advantage of ASP.NET.
|
t*****r 发帖数: 47 | 18 thanks.
【在 st 的大作中提到】![](/moin_static193/solenoid/img/up.png) : there's no "full advantage" of asp.net any way. glad it works. :D
|
G**T 发帖数: 388 | 19
maybe just use webservice.
anyway, as long as it works, it is ok.
nx ya
【在 t*****r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : thanks.
|