I'm calling a console application from a Web Form which sends out an email blast. In the finally block of the console code, a confirmation email is sent with a count of successful emails.
During runtime, two confirmation mails are being generated instead of one; the first one always has 0 email count, and the second one has the actual count.
Here is the calling code in the Web Form:
ProcessStartInfo info = new ProcessStartInfo();
string arguments = String.Format(@"""{0}"" ""{1}""",
message.Subject.Replace(@"""", @""""""),
message.Body.Replace(@"""", @""""""));
info.FileName = MAILER_FILEPATH;
Process process = Process.Start(info.FileName, arguments);
Process.Start(info);
What am I doing wrong?