EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Why the code works in GUI or console application but doesn't work in a system service?

There are several things to check in this situation:

If the GUI/console application and the service are different applications, then be sure that you have copied *all* the code, related to SecureBlackbox, from the GUI/console application to the service. Check that all properties are set in the same way (as they are set in code, you can just copy the block of code that sets properties). If any events are handled, remember to copy all event handler code as well.

Next, in .NET check that your service application references and loads all needed SecureBlackbox assemblies. For example, for SFTP functionality it's not enough to reference SecureBlackbox.SFTP.dll. You also need SecureBlackbox.dll, SecureBlackbox.SSHCommon.dll, SecureBlackbox.SSHClient.dll and SecureBlackbox.SFTPCommon.dll

If the application is the same and is run in different modes (as a GUI/console application and as a service), then you need to check user permissions for all involved files, i.e. for assemblies, external keyrings, certificates or key files which are loaded by the application. It can happen that the user SYSTEM (under which the services are run by default) doesn't have rights to access certain folder or file.

Finally, ensure that the data is loaded correctly from the external files. If you have relative path to the file, check that this path points to the same correct files in UI/console mode and in service mode. It's possible that when you load a key or certificate, they are not loaded correctly in service mode due to incorrect file path.

Return to the list


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!