|
The fax interface uses a user interface dialog (UI), try and enable 'desktop interaction' on your service. Hope that helps.
I don't think this is an security issue, but possibly, services need special permissions to access network resource or UNC paths, but the faxing should be local. Also keep in mind that you are calling a Desktop tool and not another service here. I might be a service handeling the actual faxing, but we are only instructing the windows faxing UI interace.
Leon v Wyk
|
|
|
|
|
I tried also 'desktop interaction', I forgot to mention that..
I set the permissions, because many people reported similar problems when using FS in web services or ASP.NET applications. It was issue with no permissions for CurrentUser - application starts in different user context than it is running in.
Somebody has to know answer for my question
|
|
|
|
|
Error while sending Fax from the C# applicaion
Error "The object identifier does not represent a valid object. (Exception from HRESULT: 0x800710D8) "
How to get rid of the Above error. Any idea would be really appericated.
Code:
using System.Runtime.InteropServices;
using FAXCOMLib;
namespace FAX
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
FaxServer faxServer = new FaxServerClass();
faxServer.Connect(Environment.MachineName);
FaxDoc faxDoc =(FaxDoc)faxServer.CreateDocument(@"C:\TestDoc.txt");
faxDoc.FileName="C:\\TestDoc.txt";
faxDoc.SendCoverpage = 1;
faxDoc.CoverpageName = @"C:\TestDoc.txt";
faxDoc.CoverpageSubject = "Test Fax";
string bodyText = "This is a test" + Environment.NewLine;
bodyText += "list of products" + Environment.NewLine;
bodyText += "that should be on several lines";
faxDoc.CoverpageNote = bodyText;
faxDoc.RecipientName = "Test Recipient Name";
faxDoc.FaxNumber =FaxNumbr;
faxDoc.DisplayName = "TestFax";
faxDoc.SenderName = "Annadurai";
int iFaxJob = faxDoc.Send(); // Error occuring place
Response.Write(iFaxJob.ToString());
faxServer.Disconnect();
}
catch (Exception Ex)
{
Response.Write(Ex.Message);
}
}
}
}
Regards
Annadurai
|
|
|
|
|
Error while sending Fax from the C# applicaion
Error "The object identifier does not represent a valid object. (Exception from HRESULT: 0x800710D8) "
How to get rid of the Above error. Any idea would be really appericated.
Code:
using System.Runtime.InteropServices;
using FAXCOMLib;
namespace FAX
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
FaxServer faxServer = new FaxServerClass();
faxServer.Connect(Environment.MachineName);
FaxDoc faxDoc =(FaxDoc)faxServer.CreateDocument(@"C:\TestDoc.txt");
faxDoc.FileName="C:\\TestDoc.txt";
faxDoc.SendCoverpage = 1;
faxDoc.CoverpageName = @"C:\TestDoc.txt";
faxDoc.CoverpageSubject = "Test Fax";
string bodyText = "This is a test" + Environment.NewLine;
bodyText += "list of products" + Environment.NewLine;
bodyText += "that should be on several lines";
faxDoc.CoverpageNote = bodyText;
faxDoc.RecipientName = "Test Recipient Name";
faxDoc.FaxNumber =FaxNumbr;
faxDoc.DisplayName = "TestFax";
faxDoc.SenderName = "Annadurai";
int iFaxJob = faxDoc.Send(); // Error occuring place
Response.Write(iFaxJob.ToString());
faxServer.Disconnect();
}
catch (Exception Ex)
{
Response.Write(Ex.Message);
}
}
}
}
Regards
Annadurai
|
|
|
|
|
try using FAXComExlib instead FAXComLib.
Also, not sure if this works in a web interface.
Leon v Wyk
|
|
|
|
|
by using this faxcom.dll ???
--
alecc#
|
|
|
|
|
Configure Faxing service from Start/Accessories/Communication/Fax and enable Fax sending and also receiving to specified folder.
Everything you have to do is to implement or get some Folder watcher class and check for new faxes
|
|
|
|
|
Hi,
I 'm working on this FaxComLib to send randome faxes wich are more than one number (say around lakhs of fax). Out of those few fax numbers are invlid due to of some reason (let's say either destination fax not working or not responding or does not exist at all). Now filtering out those failure numbers is very important for me. Well ,I've already find a way to fetch it from the outgoing archives' each fax's status information and from that I take status of it. I do not know whether its the best solution or not. I went through google and microsoft website also but of not help much to get confirmed about my query.
But is thre any way that promptly I can get the status of a faxsending request. The send method also returns a integer value but does not understand which is number is for successful or failure. So here if you could focus something on this issue then your effort weould be highly appreciated. Well, this is my request to you - two hands are better than one hand .
Thank you
AShok
AShok
|
|
|
|
|
Not something I have tried to spend time on, but are going to be looking into it in the near future. If I make any findings I will post it on here. Good luck.
Leon v Wyk
|
|
|
|
|
Hi Ashok,
Could you please e-mail your program of sending lacks of fax at the same time to my yahoo id at.
mast428@yahoo.com.
Thanks.
|
|
|
|
|
Could you please email me your code to wade@cranswick.co.za. Thank you
|
|
|
|
|
could you please send the code to my email thunder_emperor_29@yahoo.com
thanks..
|
|
|
|
|
Ya. I am having a problem with this app. I type in the required data and then when I click send it tells me this in a pop up box?
The data is invalid.
Can some one clearify this extremelly specific error mesage?
|
|
|
|
|
i m having the same problem when i try to send a '.csv' file type. this app successfully works for me when i send .doc, .bmp or .pdf. Pls help if any one has any idea why it isnt working for .csv file type.
Danyal
-- modified at 4:02 Thursday 4th May, 2006
|
|
|
|
|
Little late, but this could help somebody else.
Associate .csv file type with notepad. Not all applications are capable of "communicating" with Faxing service. I know only about MS Office applications, Adobe reader and notepad
Hope it helps
LAcike
|
|
|
|
|
Would it be possible to amend the code so it can read in Postscript files. With this you could set up a phantom printer that prints postscript files to a directory and then a windows service , based on this code could automate the fax process.
That would also solve the problem printing pdfs.
Nick James
Nick James Homepage
|
|
|
|
|
Not sure, don't know to much about post scripting, but I see where you are heading. Good thining!
Leon v Wyk
|
|
|
|
|
Hi there,
I have tried your application several times but unfortunately I have not been successful in sending a fax and instead I get one of the following error messages:
a) Cannot find the specified file path.
b) Invalid Data
I'd greatly appreciate any help. Thanks in advance.
|
|
|
|
|
Hi
I am also facing a problem. I am trying to run this same code in a windows service. however the moemnt it comes on the send() part it fails. I mean it does nothing. the same code in a console applicaiton or a win form application runs perfectly fine. But the same function fails on a Windows Service!
Any suggestions???
|
|
|
|
|
Tanks Leon.
i use this method for Faxing.
it work well
when faxing a doc or... popup a software and open it and ten close the software.
how can i hide the software popup from the user view
(pop up in backGround).
tank's rashidi
|
|
|
|
|
Not sure what you mean but have a look at the previous postings, maybe you have the same question as the pdf doc.
Leon v Wyk
|
|
|
|
|
Hi Leon,
I have doenloaded the source that you created. My one concern is that the Acrobat reader pops up prior to sending the fax document to the print service. I am sure this is because the print service needs to convert the data to fax bytes (tif).
Do you know of a way to supress this dialog or to run the conversion in the background?
I need to use this in an NT service that will poll a file system location for dropped PDF documents?
Regards
Jaco de Villiers
|
|
|
|
|
I have not used .pdf docs for this yet, but have a look at getting thumbnails from a pdf doc, I know I saw an article somewhere how to do that. Then you can use a bmp to send the fax. Otherwise try open the pdf doc with Proccess and make it hidden just before you send the fax, that might suppress the extra pdf doc from opening another window.
Leon v Wyk
|
|
|
|
|
Thanks Leon. I fetch the handle of the acrobat viewer and then kill the process using System.Diagnostic.Process. I will post the code here if I find a more elegant way of extracting the byte[] in tiff(bmp) format.
JDevil
|
|
|
|
|
Hi JDevil,
I'm trying to implement the same solution for preventing Acrobat Reader from popping up whenever a PDF should be faxed. But if the AcroReader process is killed to soon faxing fails (because Acrobat didn't have enough time to 'print' the PDF), and otherwise Acrobat pops up for a few seconds.
How did you solve this exactly?
Thanks in advance,
Sebastian
|
|
|
|