Question

I need your advice with the following situation.

The task is rather simple. I have to create a windows service that works with mail (Exchange Server, reading mail), works with files (save attachments to specific folder and so on) and writes results to database (create documents from mail items or write intermediate results).

This service was created long ago and is working now rather fine. But there is one big problem: it hangs very often. It hangs in some strange places and out colleagues (on our client's side) that monitor our service have to restart it manually. Moreover they do not restart it. They have to kill service's process and start it again from SCM.

What I have: a windows service written in C# that works with CDO 1.21 library. This library is certainly unmanaged. We use this library because we have to work over MAPI protocol with Exchange Server.

What is the problem: as I wrote the main problem is hanging. Also we have to work exactly with MAPI. Not POP3 neither Exchange Web Services neither any other protocols.

What I want to have: stable Windows Service working with Exchange Server. And it's desirable thet it's written in C#.

So what can you suggest? I did not find any managed libraries to work with MAPI, only some opensource projects but I did not try them. Also there is some library called CDO but it is also unmanaged. Probably I have to rewrite the service in C++ but I'm not very familiar with it. I found an exmaple here: http://code.msdn.microsoft.com/windowsdesktop/CppWindowsService-cacf4948 but I also have to work with files and SQL. This all is ready working in C#. Any ideas?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top