Click here to Skip to main content
11,488,877 members (76,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 22:09pm
Edited 15-Mar-13 22: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 499
1 OriginalGriff 328
2 _Asif_ 155
3 Sascha Lefèvre 135
4 _duDE_ 121
0 Sergey Alexandrovich Kryukov 9,308
1 OriginalGriff 8,375
2 Sascha Lefèvre 3,334
3 Maciej Los 2,996
4 Richard Deeming 2,370

Advertise | Privacy | Mobile
Web04 | 2.8.150520.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