I have developed some backend console apps which are supposed to run on the server.
They are called Server Process and Server Agent. The Server Process always create instances of server agents (as a process) time by time, here is the code for calling server agent
private static void CreateUpdatedBookingAgent(UpdatedBooking oUpdatedBooking)
{
try
{
//Run the Console App
string command = @"C:\ServerAgentConsole.exe";
string args = ("UpdatedBooking " + oUpdatedBooking.MeetingKey + " " + oUpdatedBooking.ServiceAccountEmail.Trim() + " " + oUpdatedBooking.ServiceAccountPassword.Trim()
+ " " + oUpdatedBooking.ServiceAccountEmail.Trim()+ " " + oUpdatedBooking.MailBoxOwnerEmail.Trim() + " " + oUpdatedBooking.Method.Trim()
+ " " + oUpdatedBooking.ExchangeURL + " " + oUpdatedBooking.ApiURL + " " + oUpdatedBooking.Subject + " " + oUpdatedBooking.Location
+ " " + oUpdatedBooking.StartTime + " " + oUpdatedBooking.EndTime).Trim();
Process process = new Process();
process.StartInfo.FileName = command;
process.StartInfo.Arguments = args;
process.EnableRaisingEvents = true;
process.Exited += new EventHandler(processExitedUpdatedBooking);
process.Start();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
My question is:
Can I use .NET remoting for this, I mean is it a good way of doing this?
If not, is there a better way of passing the data (arguments) to the server agent?
The server and client both must be console application. According to my knowledge, the I can not get a benefit from WCF in that case. Am I correct?