C# Example Code
Overview
-
A very basic C# code sample that will allows to send a fax to the Multitech Fax Finder device using Web Service API.
Prerequisites
- Download and Install Visual C# 2008 Express Edition http://www.microsoft.com/express/Downloads/
- Download the C# sample source code Sendfax-Csharp.zip here
Note:
- The
scheldule.xml
is located under the/SendFax/SendFax
folder.
Modify schedule.xml
Load the schedule.xml file into your favorite editor, find the section below, and modify the fax number to point to your recipient fax number:
<recipient>
...
<fax_number>5138</fax_number>
</recipient>
Save it.
Modify Program.cs
Double Clicks on the SendFax.sln to load it into the C# IDE. Modify the following:
Change the user name and password to match yours.
request.Credentials = new NetworkCredential("admin", "admin");
Change the IP address of the following line to point to your Fax Finder’s IP address.
WebRequest request = WebRequest.Create("http://216.133.69.247/ffws/v1/ofax");
Change the file path to match yours.
FileInfo fileSize = new FileInfo("C:/Users/test/Documents/Visual Studio/2008/Projects/sendFax/sendFax/schedule.xml");
StreamReader textIn = new StreamReader(new FileStream("C:/Users/test/Documents/Visual Studio 2008/Projects/sendFax/sendFax/schedule.xml",FileMode.Open,FileAccess.Read));
Save and Run it.
Now, if you web into your FaxFinder device and go to Status & Log -> Fax Status, you should be able to see the Fax Finder is sending out a fax.