Calling a new process from ASP.NET web page

B

bienwell

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top