[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 98
  • 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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