Click here to Skip to main content
11,710,824 members (84,828 online)
Rate this: bad
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

1 solution

Rate this: bad
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[^]
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

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 549
1 OriginalGriff 260
2 Peter Leow 134
3 Abhinav S 130
4 Richard MacCutchan 90
0 Abhinav S 60
1 Member 4653839 40
2 barneyman 35
3 Sergey Alexandrovich Kryukov 35
4 Member 11793820 35

Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 16 Mar 2013
Copyright © CodeProject, 1999-2015
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