Go Back   Velocity Reviews > General Computer Discussion > Software
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
Old 09-29-2009, 03:20 PM   #1
Default Asynchronous process from asp.net page button click event?


Hi

I have one Page1.ASPX.
On Button CLick event, it initiates another Jar execution thru System.Process object.
Sometimes this process may take from 15 to 30 min... Even if the user goes out of the screen also, the process should run asynchronously and complete the job.
How Can we make this process asynchronous?? Can anybody provide Code Snippet?

//Button Click Event for running .jar file
protected void btnRun_Click(object sender, EventArgs e)
{
String strJarFilePath = "\\RunPull.jar";

Process proc = new Process();
try
{
proc.StartInfo.FileName = "java";
proc.StartInfo.Arguments = "-jar " + strJarFilePath;
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
proc.StartInfo.UseShellExecute = false;

DirectoryInfo currentDir = new DirectoryInfo(Environment.CurrentDirectory);
proc.StartInfo.WorkingDirectory = currentDir.FullName;

proc.Start();
}
catch (Exception ex)
{
throw new Exception("Failed to start Pull process");
}

Any solution or code reference would really be appreciated.


Thanks


Ritha
Ritha is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make the system.process as asynchronous from asp.net page button click event? Ritha Software 0 09-29-2009 08:17 AM
How to activate Remote Assistance with XP using Windows Live Messenger Oziisr General Help Related Topics 0 02-01-2008 04:45 PM
How to make your wonderful photo and video slideshow on DVD kricww@gmail.com DVD Video 0 04-20-2006 07:26 AM
winsock.dll J A+ Certification 7 07-20-2004 01:01 AM
Latest Tech Fiasco... Ghost A+ Certification 30 01-09-2004 12:15 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46