C#:发送传真时出错 [英] C#: error in sending fax

查看:123
本文介绍了C#:发送传真时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下代码发送传真:

I use the following code for sending a FAX:

protected void Page_Load(object sender, EventArgs e) 
{ 
if (!IsPostBack)
{ FaxDocument(@"E:\ss.doc", "04428257363"); 
} 
} public int FaxDocument(String TheFile, string faxnumber)
{
int JobID = 0; FAXCOMEXLib.FaxServer faxsrv = new FAXCOMEXLib.FaxServerClass(); 
try 
{ faxsrv.Connect(Environment.MachineName); FaxDocumentClass faxdoc = new FAXCOMEXLib.FaxDocumentClass();
//*** How can I add 2 or more attachments to my fax Body with the use of one coverpage?
 faxdoc.Body = @"E:\ss.doc"; //****************************************************************************************** 
faxdoc.Priority = FAX_PRIORITY_TYPE_ENUM.fptNORMAL; faxdoc.CoverPageType = FAXCOMEXLib.FAX_COVERPAGE_TYPE_ENUM.fcptLOCAL; 
faxdoc.CoverPage = "TestCoverPage"; 
faxdoc.ScheduleType = FAXCOMEXLib.FAX_SCHEDULE_TYPE_ENUM.fstNOW;
faxdoc.DocumentName = "Fax Transmission"; faxdoc.Recipients.Add(faxnumber, "Lexicon"); 
faxdoc.AttachFaxToReceipt = false; 
faxdoc.Note = "Here is the info you requested"; 
faxdoc.Subject = "Today''s fax"; 
faxdoc.ConnectedSubmit(faxsrv); 
} 
catch (Exception ex)
{
Response.Write(ex.Message);
} 
finally 
{
faxsrv.Disconnect();
}
return JobID;
}
}


但是,出现以下错误:


However, I get the following error:

Retrieving the COM class factory for component with CLSID {CDA8ACB0-8CF5-4F6C-9BA2-5931D40C8CAE} failed due to the following error: 80040154.



非常感谢您对解决此错误的任何帮助.



Any help into solving this error is greatly appreciated.

推荐答案

这表明您无法启动用于发送传真的第三方lib,因为:

1.它没有重新挂载/未安装在您的系统上.
2.第三方库使用的其他组件未安装.

有大量的应用程序可以帮助您找到lib需要的依赖项...

在这里看看一些有用的工具...

SysInternals

"listdlls"和"procexp"可能有用...
This is indicating that the 3rd party lib that you are using to send the fax cannot be started because:

1. It isn''t resigered / installed on your system.
2. Some other component the third party lib uses is not installed.

There are a whole raft of app that will help you find what dependencies the lib requires...

Take a look here for some useful utils...

SysInternals

''listdlls'' and ''procexp'' may be useful...


这篇关于C#:发送传真时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆