Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2004

Tip: Looking for answers? Try searching our database.

Invoking a command line .exe program

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simon Harvey - 29 Jul 2004 11:46 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.