Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0
hai everyone
I need a suggestion that how to execute a programm in the background upto now i can able to run a programm in background in my web application but what i need is i need to compile and run the programm in the background and store the result in the table everytime if there are any errors in the programm i need to display.
 
Hope can anybody able to suggest me.
 

Thanks &Regards,
Posted 15-Mar-13 21:09pm
Edited 15-Mar-13 21:10pm
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Various ways you can do it.
1. You can create a thread and set its property background. Start the thread when you need from your application.
2. You can use System.ComponentModel.BackgroundWorker class from your web application. It will take care all your background program running job.
3. You can create a method which run the program and execute that method asynchronously.
4. If you can run an executable from your web application then please read the article
Run .exe inside ASP.NET and catch exception using AppDomain[^]
  Permalink  
Comments
Deepthi.B at 16-Mar-13 3:33am
   
even i am using System.ComponentModel.BackgroundWorker class to run my application ,can we able to execute ".cs" files in the background instead of .exe files.
S. M. Ahasan Habib at 16-Mar-13 8:22am
   
yes you can use .cs files methods. please visit the link for example
http://unboxedsolutions.com/sean/archive/2005/11/05/787.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Schatak 394
1 OriginalGriff 355
2 _Amy 115
3 Sergey Alexandrovich Kryukov 109
4 Andreas Gieriet 100
0 OriginalGriff 7,097
1 Sergey Alexandrovich Kryukov 5,623
2 Maciej Los 3,504
3 Peter Leow 3,373
4 DamithSL 2,505


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 16 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100