Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Forums > Software

Vista - Exception attempting to send fax from C#

Reply
 
Old 01-08-2009   #1 (permalink)


Vista Ultimate
 
 

Exception attempting to send fax from C#

Hi,

I am attempting to send a fax programatically using C# and .Net 2.0. The following is the relevant test code:

try
{
FAXCOMEXLib.FaxServer fs = new FAXCOMEXLib.FaxServer();
fs.Connect("Fax");
FAXCOMEXLib.FaxDocument fd = new FAXCOMEXLib.FaxDocument();
fd.Body = "This is the fax text.";

fd.Recipients.Add("905-123-1234", "Test Recipient Name");
//This JobID[0] can be used to store the JobID of the fax job for later reference.
string[] JobID = (string[])fd.ConnectedSubmit(fs);
FAXCOMEXLib.FaxOutgoingQueue foq = fs.Folders.OutgoingQueue;
foq.Refresh();
string returnval = "";
foreach (FAXCOMEXLib.FaxOutgoingJob foj in foq.GetJobs())
{
returnval += foj.Id + ": " + foj.SubmissionTime + ": " + foj.Status + "/" + foj.ExtendedStatus + Convert.ToChar(10);
}
fs.Disconnect();
}
catch (Exception ex)
{
WriteLog("Exception caught SendFaxMessage: " + ex.ToString());
}
}
}

An exception is thrown as soon as I attempt to connect to the Fax driver:
fs.Connect("Fax");

The exception details are:

System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

"Fax" is the name of the Microsoft Shared Fax Driver (Windows Fax and Scan in Windows Ultimate with Servvice Pack 1).

Any advice wuld be appreciated.

P.S. If this is not the correct forum please let me know.

Thanks

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
error msg when attempting to send or recieve mail Vista mail
Attempting to use gmail, using 465 and SSL, can't send messages st Live Mail
Exception calling "Send" with "1" argument(s) error using PING PowerShell
Exception stack is corrupt when catching and storing the exception .NET General
Vista Install Error: Exception Unknown Software Exception Vista installation & setup


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46