【问题标题】:RightFax COM API 0x80072710 Invalid Owner IDRightFax COM API 0x80072710 无效的所有者 ID
【发布时间】:2016-10-31 20:10:37
【问题描述】:

美好的一天!试图让 RightFax COM API 为我们工作。在obj_Fax.Send();,我收到一个错误0x80042710,我不知道为什么。我在网上找不到任何关于此的详细信息,希望有一些建议。

错误信息:

System.Runtime.InteropServices.COMException (0x80042710): Invalid owner ID.

SendFax 方法:

    public DataPackage<FaxInfoResponse> SendFax(string faxNumber, string recipientName, byte[] data)
    {
        try
        {
            DataPackage<FaxInfoResponse> dp = new DataPackage<FaxInfoResponse>();
            if ((faxNumber.Length != 10) || (!faxNumber.All(Char.IsDigit)))
            {
                dp.ErrorId = Guid.NewGuid().ToString();
                dp.ErrorMessage = "Fax Number must consist of 10 numbers";
                dp.Data = new FaxInfoResponse();
                return dp;
            }
            RFCOMAPILib.Fax obj_Fax = (RFCOMAPILib.Fax)_server.get_CreateObject(RFCOMAPILib.CreateObjectType.coFax);
            obj_Fax.ToFaxNumber = faxNumber;
            obj_Fax.ToName = recipientName;
            var filePath = String.Format("{0}{1}.pdf", ConfigurationManager.AppSettings["TempWriteDirectory"], faxNumber);

            using (var fStream = new FileStream(filePath, FileMode.Create))
            {
                fStream.Write(data, 0, data.Length);
            }

            obj_Fax.Attachments.Add(filePath, RFCOMAPILib.BoolType.True);
            /*********** ERROR OCCURS HERE ***********/
            obj_Fax.Send();
            /*****************************************/
            int faxHandle = obj_Fax.Handle;
            obj_Fax = _server.get_Fax(faxHandle);
            dp.ErrorMessage = "";
            dp.ErrorId = "";
            FaxInfoResponse resp = new FaxInfoResponse { FaxHandle = faxHandle, FaxStatus = obj_Fax.FaxStatus.ToString(), FaxUniqueId = obj_Fax.UniqueID.ToString() };
            dp.Data = resp;
            Log.Info("Fax successfully sent for fax: Fax Number = " + faxNumber + " Recipient Name = " + recipientName);
            return dp;
        }
        catch (Exception ex)
        {
            // Blah blah error handling
        }
    }

【问题讨论】:

    标签: web-services rightfax


    【解决方案1】:

    公平地说,我们并没有真正“解决”这个问题,而是做了一个解决方法。我们部署到安装 RightFax 的服务器上。不管出于什么原因,这就是问题所在。只需在本地或任何其他服务器上部署并安装 RF 客户端即可。问题解决了。

    【讨论】:

      猜你喜欢
      • 2011-10-29
      • 1970-01-01
      • 2012-09-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多