Solved

Calling a Console application from Asp.net

Posted on 2015-01-05
4
92 Views
Last Modified: 2015-01-20
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
Comment
Question by:yadavdep
  • 2
4 Comments
 
LVL 33

Expert Comment

by:it_saige
ID: 40531985
Is this console application running on the server or the clients?

-saige-
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40531993
Also, is this a .NET console application or not?
0
 

Author Comment

by:yadavdep
ID: 40532042
Console application will be on the same server where the site is hosted.
It is donet console application only.
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 40532235
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question