none
FaxcomExLib issue : Exception when connecting to Microsoft Fax Server running on Windows Server 2008 RRS feed

  • Question

  • Hello,

    I have installed a new server Windows Server 2008 R2 to replace an old one that was a Windows Server 2003. On both, the Microsoft Fax Service is installed.

    I have developed a .NET app that submits faxes to the fax server. In the 2003 server, it worked fine, but since I have installed the 2008 R2, the .NET app cannot submit faxes anymore. The following exception is thrown : "Invalid operation".

    This app has been running for several years with no problem on Windows Server 2003. But now I have to make it work with the Fax Service on Windows Server 2008.

    When I try to submit faxes not programatically, using the fax as a shared printer, it works. That is kind of wierd. I guess something as changed on the 2008 architecture that does'nt accept faxes programatically ?

    I read that there are some limitation to submit faxes from the FaxcomExLib :

    http://msdn.microsoft.com/en-us/library/ms690910%28VS.85%29.aspx

    ... but nothing about Windows Server 2008.

    Here is a sample of the .NET code :

    // THIS CODE IS RUNNING ON A WINDOWS XP CLIENT
    faxDoc = new FaxDocumentClass(); faxServer = new FaxServerClass(); faxServer.Connect(FaxServerDnsName); // THIS WORKS ON BOTH 2003 and 2008 AS FAX SERVER faxDoc.Body = body; // ADD SOME RECIPIENTS (from my own objects)
    for(i = 0; i < recipients.Count; i++) { recipient = (FaxRecipient) recipients[i]; faxDoc.Recipients.Add(recipient.FaxNumber, recipient.Name); } faxDoc.Subject = "TEST"; JobIDs = (System.Array) faxDoc.ConnectedSubmit(faxServer); // WORKS ON 2003, THROWS AN EXCEPTION ON 2008!!!

    Can you help me please ? I am really in trouble with this issue. Any help will be welcome !

    Thank you.

    Best regards.

    Matteo

     


    Matteo, .NET Developer
    Friday, January 7, 2011 5:46 PM

Answers

  • Actually I have resolved this issue. It was a printer mapping issue. The old fax was still on the client machine in the same time as the new one as follows :

     

    Fax 1 : \\OldServer\Fax

    Fax 2 : \\NewServer\Fax

     

    After removing the Fax 1, the code works. Strange behaviour anyhow.

    I hope this will help someone else in the future.

    Regards.

    Matteo


    Matteo, .NET Developer
    • Marked as answer by joujoukinder Monday, January 10, 2011 1:54 PM
    Monday, January 10, 2011 1:54 PM

All replies

  • Actually I have resolved this issue. It was a printer mapping issue. The old fax was still on the client machine in the same time as the new one as follows :

     

    Fax 1 : \\OldServer\Fax

    Fax 2 : \\NewServer\Fax

     

    After removing the Fax 1, the code works. Strange behaviour anyhow.

    I hope this will help someone else in the future.

    Regards.

    Matteo


    Matteo, .NET Developer
    • Marked as answer by joujoukinder Monday, January 10, 2011 1:54 PM
    Monday, January 10, 2011 1:54 PM
  • Hi I have same problem in windows 2008 sp2 64bit
    Please help me
            Dim objFaxServer As New FAXCOMEXLib.FaxServer
            Dim objFaxIncomingArchive As FAXCOMEXLib.FaxIncomingArchive
            Dim objFaxIncomingMessage As FAXCOMEXLib.FaxIncomingMessage
    
            'Error handling
            On Error GoTo Error_Handler
    
            'Connect to the fax server
            objFaxServer.Connect("ASLATRM01")
    
            'Get the incoming archive
            objFaxIncomingArchive = objFaxServer.Folders.IncomingArchive
    
            'Refresh the object and retrieve/display some of its properties
            objFaxIncomingArchive.Refresh()
            MsgBox("High quota water mark: " & objFaxIncomingArchive.HighQuotaWaterMark & _
            vbCrLf & "Low quota water mark:  " & objFaxIncomingArchive.LowQuotaWaterMark & _
            vbCrLf & "Archive folder: " & objFaxIncomingArchive.ArchiveFolder & _
            vbCrLf & "Age limit: " & objFaxIncomingArchive.AgeLimit & _
            vbCrLf & "Size high: " & objFaxIncomingArchive.SizeHigh & _
            vbCrLf & "Size low: " & objFaxIncomingArchive.SizeLow & _
            vbCrLf & "Is size quota warning on: " & objFaxIncomingArchive.SizeQuotaWarning & _
            vbCrLf & "Is archive used: " & objFaxIncomingArchive.UseArchive)
    
            'Set the age limit to 4 days
            objFaxIncomingArchive.AgeLimit = 4
    
            'Save the changes
            objFaxIncomingArchive.Save()
    
            'Get a message by ID
            Dim MessageID As String
            Dim Answer As String
            Dim FileName As String
    
            Answer = InputBox("Retrieve a message by its ID (Y/N)?")
            If Answer = "Y" Then
    
                MessageID = InputBox("Provide the message ID")
    
                'Get the job
                objFaxIncomingMessage = objFaxIncomingArchive.GetMessage(MessageID)
    
                'Display information about the retrieved job
                MsgBox("Caller ID: " & objFaxIncomingMessage.CallerId & _
                vbCrLf & "CSID: " & objFaxIncomingMessage.CSID & _
                vbCrLf & "Device name: " & objFaxIncomingMessage.DeviceName & _
                vbCrLf & "Message ID: " & objFaxIncomingMessage.Id & _
                vbCrLf & "Number of pages: " & objFaxIncomingMessage.Pages & _
                vbCrLf & "Number of retries: " & objFaxIncomingMessage.Retries & _
                vbCrLf & "Routing information: " & objFaxIncomingMessage.RoutingInformation & _
                vbCrLf & "Size: " & objFaxIncomingMessage.Size & " bytes" & _
                vbCrLf & "Transmission start: " & objFaxIncomingMessage.TransmissionStart & _
                vbCrLf & "Transmission end: " & objFaxIncomingMessage.TransmissionEnd & _
                vbCrLf & "TSID: " & objFaxIncomingMessage.TSID)
    
                'Allow user to delete the message
                Answer = InputBox("Delete this message from the archive?")
                If Answer = "Y" Then objFaxIncomingMessage.Delete()
    
            End If
            Exit Sub
    
    Error_Handler:
            'Implement error handling at the end of your subroutine. This 
            'implementation is for demonstration purposes
            MsgBox("Error number: " & Hex(Err.Number) & ", " & Err.Description)
    
    
    

     

    • Edited by akaco Tuesday, September 20, 2011 12:09 PM
    Tuesday, September 20, 2011 12:06 PM
  • hello

    how can i attached more tiff page to app for sending 

    when i add to body , only last page go

    Wednesday, January 8, 2020 8:50 AM
  • Hi, 

    You should open a new issue because yours is not in this topic.

    Best regards.

    MS


    Matteo, .NET Developer and System Engineer

    Wednesday, January 15, 2020 6:19 AM