I have created a windows service to handle my the fax queue in my application.
1) By use of a timer, the service will query the database for any new faxes to be sent
2) A call to SSRS creates the fax and saves it locally as a TIFF file.
3) Then with the use of faxcomexlib, I open a connection to the fax server, attach the TIFF and send.
Everything seems to work fine until it does the ConnectedSubmit, when it throws the following error:
Operation failed. System.Runtime.InteropServices.COMException (0x80070709): Operation failed.
at FAXCOMEXLib.FaxDocumentClass.ConnectedSubmit(FaxServer pFaxServer)
I looked up that error code and it is "the printer name is invalid". I have searched the internet for days looking for this error while faxing to no avail. There is no method for setting the printer name with the faxcomexlib... nor should it be necessary. I have run the same code from a web application without issue, but need to get it working as a windows service.
1) By use of a timer, the service will query the database for any new faxes to be sent
2) A call to SSRS creates the fax and saves it locally as a TIFF file.
3) Then with the use of faxcomexlib, I open a connection to the fax server, attach the TIFF and send.
VB.NET:
Dim objFaxDocument As New FAXCOMEXLib.FaxDocument
Public WithEvents objFaxServer As New FAXCOMEXLib.FaxServer
jobID = objFaxDocument.ConnectedSubmit(objFaxServer)
Everything seems to work fine until it does the ConnectedSubmit, when it throws the following error:
Operation failed. System.Runtime.InteropServices.COMException (0x80070709): Operation failed.
at FAXCOMEXLib.FaxDocumentClass.ConnectedSubmit(FaxServer pFaxServer)
I looked up that error code and it is "the printer name is invalid". I have searched the internet for days looking for this error while faxing to no avail. There is no method for setting the printer name with the faxcomexlib... nor should it be necessary. I have run the same code from a web application without issue, but need to get it working as a windows service.