Exchange WS “在存储中找不到指定的对象。” 错误

发布于 2024-07-18 02:11:26 字数 404 浏览 4 评论 0原文

我们使用 Exchange 2007 WS 来处理邮件文件夹,如果尝试转发已收到的邮件,就会遇到各种问题。 我们的流程是:

  • Windows 服务监视邮箱文件夹,找到新邮件后,我们处理信息并将该项目移动到“已处理文件夹”并存储 Exchange 邮件 ID。
  • 用户可以选择将邮件转发到外部。 我们使用 Exchange API 使用之前存储的 Message Id 查找项目,然后再次使用 API 进行转发。

但事实证明,再次找到邮件是相当不稳定的。 我们经常收到以下错误:

在商店中找不到指定的对象。

我们是否有更好/更可靠的方法可以实现同样的目标? Exchange WS 的文档相当稀疏。

We're using Exchange 2007 WS to process mail folders and are hitting various problems if we try and forward a message we've already received. Our process is:

  • Windows Service monitors mailbox folder, on finding a new mail we process the information and move the item to a 'Processed folder' and store the Exchange Message Id.
  • Users may opt to forward the mail externally. We use the Exchange API to find the item using the Message Id we stored earlier, and then again use the API to forward.

Except finding the mail again is proving rather flaky. We regularly get the following error:

The specified object was not found in the store.

Is there a better/more reliable way we can achieve the same? The documentation for Exchange WS is rather sparse.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

呆° 2024-07-25 02:11:27

我编写了一个程序,读取收件箱中的电子邮件,将附件下载到指定文件夹,将电子邮件信息和保存的路径写入数据库,最后删除电子邮件。 我将此程序作为 Windows 服务运行。 所有测试完成后,我将该程序运行到主服务器并运行它。 程序运行成功,但有时会出现此错误。 我检查了所有内容,最后发现我忘记停止计算机上的服务。 在我的计算机和真实服务器上运行的 2 个程序同时检查同一邮箱。 如果您收到此错误,请确保只有一个程序可以处理同一邮箱。

I wrote a program that reads the emails in inbox downloads attachments to the specified folder, wrote the email info and the saved path to the database, and finally deletes the email. I run this program as a windows service. After all tests are finished I run this program to the main server and run it. Program runs successfully but sometimes I got this error. I checked everything and finally I found that I forgot to stop service on my computer. 2 programs that runs on my computer and on real server checking the same mailbox at the same time. If you get this error make sure that only one program can process at the same mailbox.

非要怀念 2024-07-25 02:11:26

这是 Microsoft Exchange 管理 API 中的一个错误。 这是了解更多信息的链接
http://maheshde.blogspot.com/2010/ 09/exchange-web-service-specified-object.html

This is a bug in microsoft exchange manage API. here is a link for more information
http://maheshde.blogspot.com/2010/09/exchange-web-service-specified-object.html

酒儿 2024-07-25 02:11:26

您是保存新找到的邮件的邮件 ID 还是将其移动到“已处理”文件夹后的邮件? 当它移动到新文件夹时,id 将会改变。

Inside Microsoft Exchange Server 2007 Web Services 是获取新发现的项目的 PR_SEARCH_KEY(0x300B,二进制),然后将其移动到“已处理”文件夹。 然后,您可以根据 PR_SEARCH_KEY 在新文件夹中搜索它,并获取它的新消息 ID 来转发它。

Are you saving the Message ID of the newly found message or the message once it has been moved to the 'Processed' folder? The id will change when it moves to a new folder.

The method recommended in the book Inside Microsoft Exchange Server 2007 Web Services is to grab the PR_SEARCH_KEY (0x300B, Binary) of the newly discovered item, then move it to the 'Processed' folder. You can then search for it in the new folder based on the PR_SEARCH_KEY and get it's new Message id to forward it.

烟花肆意 2024-07-25 02:11:26

我得出的结论是,这种情况发生在我身上是因为当我的应用程序正在处理电子邮件时,其他人正在同时摆弄电子邮件。

因此,为了解决这个问题,我将代码放在 try catch 中,看看异常是否是 == 在存储中找不到该对象,如果是,我就跳过它并继续进行下一项。 所以没有任何问题。

I have come to the conclusion that this happens to me is because while my app is processing the emails, someone else is fiddling with an email at the same time.

So to cure the problem, I put it the code in a try catch and see if the exception is == the that object not found in store, if so I just skip it and move on to the next item. So for has no issues.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文