Restart FTP Service

Is there a way to stop and restart the ftp service in WEC7 through programming?

I’ve hit an issue where if a file is being transferred through FTP and fails due to a disconnect, the file stays flagged as being written to, and is then locked out for me to delete or move it in c#. My assumption is that the ftp dll is holding that access to the file and creates the lockout issue. I currently have to reboot the system in order for the file to be released.

Any thoughts?

At least it is possible to stop services from consolealt text