[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 100
  • Last Modified:

Calling a Console application from Asp.net

I have a need to call a console application from my asp.net web app and sends few parameter to the console application.
I need to know is it even possible, if yes any example would be helpfull.
0
yadavdep
Asked:
yadavdep
  • 2
1 Solution
 
it_saigeDeveloperCommented:
Is this console application running on the server or the clients?

-saige-
0
 
käµfm³d 👽Commented:
Also, is this a .NET console application or not?
0
 
yadavdepAuthor Commented:
Console application will be on the same server where the site is hosted.
It is donet console application only.
0
 
käµfm³d 👽Commented:
You have two options:

1) You can invoke the process from the command line using the System.Diagnostics.Process class (example at bottom ofa page)

2) You can add a reference to the console application's assembly the same way you add a reference to a DLL. Then it's just a matter of invoking the correct method (and instantiating the correct class, if necessary).
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now