Hi,
I have a simple .exe application that I need to invoke from my C#
application. I need to send it two strings and then get the result back.
Can anyone advise me on how this is done?
Also, I'm currently using a windows forms application but I would like to
use an ASP.net appliocation to invoke the .exe file in the future. Is this
possible and will it cause any complications?
Thanks everyone
Simon
Christian Heide Damm - 29 Jul 2004 12:02 GMT
Answer to the first part of the question: take a look at
System.Diagnostics.Process.
Christian
> Hi,
>
[quoted text clipped - 10 lines]
>
> Simon
Shiva - 29 Jul 2004 12:06 GMT
Hi,
Did you try System.Diagnostics.Process.Start()?
Hi,
I have a simple .exe application that I need to invoke from my C#
application. I need to send it two strings and then get the result back.
Can anyone advise me on how this is done?
Also, I'm currently using a windows forms application but I would like to
use an ASP.net appliocation to invoke the .exe file in the future. Is this
possible and will it cause any complications?
Thanks everyone
Simon
Eliyahu Goldin - 29 Jul 2004 13:40 GMT
Simon,
ASP.NET application can invoke an ece in the same way as Windows form one.
The only difference is that you will need to grant "run executable" rights
to account aspnet runs under.
Eliyahu
> Hi,
>
[quoted text clipped - 10 lines]
>
> Simon
Eric Johannsen - 29 Jul 2004 17:35 GMT
Giving the ASPNET account "run executable" rights is a terrible security
hole. I would strongly suggest that you look for another solution to your
problem, perhaps rewriting the executable as a windows service (or wrapping
it on one) and having the ASP application set certain conditions (such as a
flag in the DB) that cause the code currently in the executable to run.
Eric
> ASP.NET application can invoke an ece in the same way as Windows form one.
> The only difference is that you will need to grant "run executable" rights
> to account aspnet runs under.
Nick Malik - 29 Jul 2004 15:34 GMT
The other responders gave you the answer.
I have a question: did you write the command line app? If so, can it be
rewritten in .NET?
That would give you some better answers when it comes to using resources,
especially if you plan to run this in a server.
Running it from a web page will work, but it won't be terribly scalable.
--- Nick
> Hi,
>
[quoted text clipped - 10 lines]
>
> Simon