Managing Windows Fax service from another service

609 views Asked by At

I developed a (Topshelf) service that prepares and sends fax jobs using the underlying Fax service from Windows (win7 in my case). I use FaxDotNet which just wraps the winfax.dll (former FAXCOM) for .NET.

Whenever I run my service standalone (console hosted) it works as expected. However when I install the service (with the same domain account) and start it, it hangs whenever it has to send a fax to the Fax service. The only way out is to kill the service in the task manager. What is different when running a service or a console application when it is not the executing account?

Apparently not all FaxDotNet tasks seem to hang. Retrieving and refreshing active jobs does work. Deleting a fax job throws an error.

UPDATE: Apparently the problem is outside the fax API and in Acrobat reader which is started with a print command to render the PDF content to the fax printer. When I switch to another default PDF viewer it works. So it seems that in "service mode" Acrobat doesn't signal back to the calling API that it's finished, however the acrord32.exe process is closed appropriately (no hidden dialogs or so).


Also I'm not able to use remote debugging when I run this as a service (only standalone). Any suggestions on that part? UPDATE: Nevermind this one. It displays an error but it still works.

0

There are 0 answers