G
Guest
I will try to explain the problem.
I'm doing an asynchronous copy file from local station to my FTP according
to the MSDN example:
http://msdn2.microsoft.com/en-us/library/system.net.ftpwebrequest(VS.80).aspx
see the 3-rd example ("The following code example demonstrates using
asynchronous operations to upload a file to an FTP server.")
In the main part of my service I use System.Threading.Timer.
After files copied they should be moved from one folder to another.
But the system crashes after files copied to FTP when I try any operation
with file which is already sent to ftp.
So, it's blocked, locked or whatever.
I close all streams and tried stream.Lock/Unlock.
But still the problem exists.
When I place the same code, with the same Threading Timer inside non-service
project, just WinForm, it works fine, but under the Service doesn't.
Could you give me any clue, please?
I'm doing an asynchronous copy file from local station to my FTP according
to the MSDN example:
http://msdn2.microsoft.com/en-us/library/system.net.ftpwebrequest(VS.80).aspx
see the 3-rd example ("The following code example demonstrates using
asynchronous operations to upload a file to an FTP server.")
In the main part of my service I use System.Threading.Timer.
After files copied they should be moved from one folder to another.
But the system crashes after files copied to FTP when I try any operation
with file which is already sent to ftp.
So, it's blocked, locked or whatever.
I close all streams and tried stream.Lock/Unlock.
But still the problem exists.
When I place the same code, with the same Threading Timer inside non-service
project, just WinForm, it works fine, but under the Service doesn't.
Could you give me any clue, please?