Page 1 of 1

FTPS (FTP over SSL/TLS) does not work when run as Windows Service.

Posted: Thu Jun 09, 2016 2:13 pm
by i-Ask
My task synchronize with FTPS (FTP over SSL/TLS) folder, and run as Windows Service.
It failed with unknown error (or Not trusted root) when started by the schedule, or when click the Start button on the toolbar, but It can synchronize the folder by Preview.
What is the problem?

Re: FTPS (FTP over SSL/TLS) does not work when run as Windows Service.

Posted: Thu Jun 09, 2016 2:30 pm
by i-Ask
The symptom means that the task can not run as Windows Service, but can run as a Application.
This problem is because the server's SSL certificate was installed under the user's
environment.
You can resolve this problem by exporting the root CA of the server's certificate from the user's environment, then importing the root CA into the "local machine". Or just install the server's certificate into the Trusted Root CA store.

For how to "Managing trusted root certificates for a local computer", please following this steps:
To manage trusted root certificates for a local computer
Click Start, click Start Search, type mmc, and then press ENTER.
On the File menu, click Add/Remove Snap-in.
Under Available snap-ins, click Local Group Policy Object Editor,click Add, select the computer whose local Group Policy object (GPO) you want to edit, and then click Finish.
If you have no more snap-ins to add to the console, click OK.
In the console tree, go to Local Computer Policy, Computer Configuration, Windows Settings, Security Settings, and then click Public Key Policies.
Double-click Certificate Path Validation Settings,and thenclick the Stores tab.
Select the Define these policy settings check box.
Under Per user certificate stores, clear the Allow user trusted root CAs to be used to validate certificates and Allow users to trust peer trust certificates check boxes.
Under Root certificate stores, select the root CAs that the client computers can trust, and then click OK to apply the new settings.