Hi,
I have written a .net Windows Service which watches a directory and as soon as any files are copied to the directory it FTPs those files. I am running an exe through the Service to FTP the files. But when i start the service FTP is not done. I have set the "Allow Service to interact with Desktop" option in the properties of the Service. After setting the property, the exe is getting executed but still the FTP is not done.
I implemented the same code in windows application and it is working fine. Can anyone suggest a solution.
Following is the code i tried:
Process FTPProcess = new Process();
FTPProcess.StartInfo.UseShellExecute = false;
FTPProcess.StartInfo.FileName = Settings.Default.IPSwitchPath;
FTPProcess.StartInfo.Arguments = "-s " + Settings.Default.FTPSource + " -d " + Settings.Default.FTPDestination;
FTPProcess.StartInfo.RedirectStandardOutput = true;
FTPProcess.Start();
FTPProcess.WaitForExit();
Thanks in advance,
Madhuri
I have written a .net Windows Service which watches a directory and as soon as any files are copied to the directory it FTPs those files. I am running an exe through the Service to FTP the files. But when i start the service FTP is not done. I have set the "Allow Service to interact with Desktop" option in the properties of the Service. After setting the property, the exe is getting executed but still the FTP is not done.
I implemented the same code in windows application and it is working fine. Can anyone suggest a solution.
Following is the code i tried:
Process FTPProcess = new Process();
FTPProcess.StartInfo.UseShellExecute = false;
FTPProcess.StartInfo.FileName = Settings.Default.IPSwitchPath;
FTPProcess.StartInfo.Arguments = "-s " + Settings.Default.FTPSource + " -d " + Settings.Default.FTPDestination;
FTPProcess.StartInfo.RedirectStandardOutput = true;
FTPProcess.Start();
FTPProcess.WaitForExit();
Thanks in advance,
Madhuri