Support Center

Instantiating a Fax object in a Windows Service

Aris May 07, 2013 10:25AM EDT

We use a Windows Service that runs 24/7 and sends faxes on a timer (every 10 minutes or so). I have noticed that the Service would randomly stop every now and then; so I added more log to trace down the source of the issue. Apparently the service will stop when I instantiate a Fax object (now keep in mind that I surrounded the whole thing with a "try and catch" that never catches an exception).
The code:
try{
Console.WriteLine("Instantiating a Fax Object");
Fax faxToSend = new Fax( );
Console.WriteLine("Fax Object Instantiated");
}catch(Exception ex){
Console.WriteLine(ex.Message);
}

The log last shows: "Instantiating a Fax Object" and then nothing. The service is stopped! The Windows Event Viewer does not show an error either.

.Net version: 4.0
OS version: Windows Server 2008 R2 Standard
FaxMan SDK version: 4.6.2.1

2 Data Techniques Responses and 1 Community Responses

Up -1 Rated Down
DTI Support  Data Techniques Employee May 07, 2013 10:44AM EDT

Hello,

Sorry it isnt clear, is it the Faxman4 service that' stopping or your own service/application that calls FaxMan ?

Thanks,
John
Data Techniques Support

Up 5 Rated Down
Aris  Data Techniques Employee May 14, 2013 09:39AM EDT

The FaxMan Service does not stop.
My own Service stops when I execute the following code:
try{
Console.WriteLine("Instantiating a Fax Object");
Fax faxToSend = new Fax( );// Some times it wont go over this point. It wont even throw an exception
Console.WriteLine("Fax Object Instantiated");
}catch(Exception ex){
Console.WriteLine(ex.Message);
}

Up -5 Rated Down
DTI Support  Data Techniques Employee May 14, 2013 09:45AM EDT

Hi,

Make sure you have deployed the faxman4d.dll along with the DTI.FaxMan.dll file in your service's directory. If you are missing the faxman4d.dll that could cause an exception.

If thats not it you will need to figure out what exception is being thrown when your service stops.

Thanks for your interest in our products and please let us know if you have any questions.

Sincerely,
Sean
Data Techniques Support

This question is closed to new answers.

Contact Us