Retrieving COM class factory for component ... failed error: 80080005

Hello. Any help regarding this issue would be greatly appreciated.

I'm using the SmartFTP SDK to initiate a file transfer from my application written in C#. The first thing I do is instantiate the Application object in the following way:


SmartFTP.Application app;

			

app = new SmartFTP.Application();


The file transfer works when my code runs from a Windows Form application, but the same code fails with the following error when I attempt to run it inside a Windows Service.

"Retrieving the COM class factory for component with CLSID {3316DCF1-ED70-4CB2-90E0-FA2C4B8AAB07} failed due to the following error: 80080005"

The service is running under an account that has Administrator privileges on the local machine (I've also tried it running as Local System). I've also tried various DCOM Settings on the local machine.

Can I instantiate the Client SDK COM objects from within a Windows Service, or is this a known issue?

Thank you...

I do not think you can ininitate an out-of-process server (with a GUI) from a windows service. For this purpose we have the FTP Library:
https://www.smartftp.com/ftplib

Regards,
Mat