PC Review


Reply
Thread Tools Rate Thread

Calling a new process from ASP.NET web page

 
 
bienwell
Guest
Posts: n/a
 
      22nd Feb 2008
Hi all,

I want to call a new process that sends email from the ASP.NET program. This
process runs in background and does not affect the performance of the
ASP.NET page .What I did was to develop a console application and complile
it to have an exe file. In ASP.NET page I call this exe file. Here is the
code to call this process from the ASP.NET page

Dim theTest As System.Diagnostics.Process = New System.Diagnostics.Process()

Dim i As System.Diagnostics.ProcessStartInfo = New
System.Diagnostics.ProcessStartInfo()

i.FileName = Directory.GetCurrentDirectory.ToString & "\EmailApp.exe"

i.Arguments = "email_address parameter1 parameter2"

i.CreateNoWindow = True

i.UseShellExecute = False

theTest.StartInfo = i

theTest.Start()

and the error "The system cannot find the file specified" was pointed to
this TheTestStart()

Please provide the rcorrect source codes if you can.

Thanks in advance.









 
Reply With Quote
 
 
 
 
Peter Bromberg [C# MVP]
Guest
Posts: n/a
 
      22nd Feb 2008
Why don't you just make an email class for your app and make the method call
on a background thread?
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: htp://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net


"bienwell" wrote:

> Hi all,
>
> I want to call a new process that sends email from the ASP.NET program. This
> process runs in background and does not affect the performance of the
> ASP.NET page .What I did was to develop a console application and complile
> it to have an exe file. In ASP.NET page I call this exe file. Here is the
> code to call this process from the ASP.NET page
>
> Dim theTest As System.Diagnostics.Process = New System.Diagnostics.Process()
>
> Dim i As System.Diagnostics.ProcessStartInfo = New
> System.Diagnostics.ProcessStartInfo()
>
> i.FileName = Directory.GetCurrentDirectory.ToString & "\EmailApp.exe"
>
> i.Arguments = "email_address parameter1 parameter2"
>
> i.CreateNoWindow = True
>
> i.UseShellExecute = False
>
> theTest.StartInfo = i
>
> theTest.Start()
>
> and the error "The system cannot find the file specified" was pointed to
> this TheTestStart()
>
> Please provide the rcorrect source codes if you can.
>
> Thanks in advance.
>
>
>
>
>
>
>
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling FTP process =?Utf-8?B?SmltIEhlYXZleQ==?= Microsoft C# .NET 1 31st Mar 2006 08:31 PM
Calling the IPConfig process Manoj Nair Microsoft C# .NET 2 6th Apr 2005 04:31 AM
How to kill a process of a calling app jake Microsoft VB .NET 4 1st Feb 2005 03:59 PM
How to know calling process name? David Hoffer Microsoft Dot NET Framework 1 9th Sep 2004 09:00 PM
Calling a method on a different process Mike Smith Microsoft C# .NET 3 8th Aug 2003 07:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:21 PM.