This project is read-only.

server.Send("",@"C:\test.txt") - The system cannot find the file specified

Apr 6, 2011 at 10:34 PM

Hello-

Wanted to know if there were any tips that could be offered to help me resolve a "The system cannot find the file specified" error on the server.Send() method.  Specifically the String argument for the fileName path is throwing the error.  Here is the code I am currently running:  Any thoughts why I could be receiving that error?  I've tried granting folder permissions on C: to the Everyone group with full read/write/mod access.  Also, this is using Fax .NET 1.0.1 (.NET 2.0)

using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Tourreau.Gilles.FaxDotNet;

namespace Fax
{
    static class Program
    {
        [STAThread]
        static void Main()
        {
            System.Console.WriteLine("Fax - Main() Start");

            //Connect to FaxServer
            using (FaxServer server = new FaxServer("", "HP MFP Send Fax"))  // "" should indicate it is localhost
            {
                FaxInformations info;
                FaxJob job;
                info = server.GetDefaultInformations();  //Get default data informations on Windows Fax Service

                info.RecipientName = "My Name"; //Fill the recipient name
                info.RecipientNumber = "+1112223333";  //Fill the recipient number

                job = server.Send(info, @"C:\test.txt");

                Console.WriteLine("Current status : " + job.Status);
            }
        }
    }
}

May 26, 2011 at 1:21 PM

You need set the CoverPage Property value as red font

                info = server.GetDefaultInformations();  //Get default data informations on Windows Fax Service

                info.RecipientName = "My Name"; //Fill the recipient name
                info.RecipientNumber = "+1112223333";  //Fill the recipient number

                //Fill the CoverPage
                info.CoverPage = null;

                job = server.Send(info, @"C:\test.txt");