Sending a fax with body (*.doc or *.txt) from asp.net application

  • Thread starter Thread starter smalolepszy
  • Start date Start date
S

smalolepszy

All,

I can't seem to send a fax from my asp.net code on my windows 2003
server. I have been able to get it to send just a cover page fax from
an ASP page, but the process just hangs when I try to define the body.
Once I try to define the FaxDocument.Body field, it hangs for about 5
minutes and finally comes back and says the script has timed out.
This is my code:

FaxServer fs = new FaxServer();

fs.Connect("");
FaxDocument fd = new FaxDocument();

fd.Body = "C:\\file.txt";


fd.Recipients.Add("222","Somebody");

fd.CoverPageType = FAX_COVERPAGE_TYPE_ENUM.fcptNone;

fd.Subject = "Subject";
fd.Note = "Text note";

fd.Sender.Name = "My name";
fd.Sender.FaxNumber = "223";

fd.ConnectedSubmit(fs);

fs.Disconnect();

I can send a fax with note, without Body. But I need to send a fax with a body.
Also, I've noticed that after trying to execute the code, there seems
to be a random notepad.exe process hanging out there owned by "NETWORK
SERVICE" that I can see in the task manager. There seems to be one
for every time I try to execute the code.

Any help would be greatly appreciated.

Thanks,
Sławek
 
Hello,

If you get tired trying to solve the problem with Windows 2003, you
could try a shortcut by using a fax Web Service.

The InterFAX Fax Web Service example in the following link shows how
to send a binary file, such as DOC, from ASP:

http://www.interfax.net/en/dev/webservice/samples/fax_asp_sendfax.html

As a developer, you can register and use the service for free. The
only limitation is that you can fax to just one number that you
designate when you register.

Adam M
Interfax
www.interfax.net
 
Sorry, but I want fax to more than one number and I want to use
FAXCOMEXLib, which is free. I don't want Fax Web Services, but API for
Windows Fax Services.
 
Back
Top