We have an internally written program in C# that use RDO in Outlook Redemption to create, modify, or delete contacts in an Outlook Contacts folder. This is Outlook 2019 connected to on-premise Exchange. The program is successful is creating, modifying or deleting contacts. However, if Outlook is not running, when the C# program tries to exit, it hangs. I can see the process is idle in Task Manager. Even if I wait overnight, the program never exits.
If I run the C# program with Outlook running, the program runs to completion, doing what it needs to do, and exits successfully.
What do I need to change, whether it's in the C# code, in Outlook settings, or in Windows settings, that will allow the program to exit cleanly?