SignedXml.CheckSignature 性能问题

发布于 2024-08-19 03:27:51 字数 234 浏览 8 评论 0原文

我在使用 .NET 3.5 检查 XML 文件的签名时遇到问题。一切工作正常,但随机性能很差。有时它是即时的,但有时可能需要 10 或 15 秒才能返回。

我检查了机器,没有任何事情影响它的整体性能,并且在不同的机器上也是相同的,所以我不认为它与一台机器有关。

我已将其范围精确地缩小到 .CheckSignature() 方法,因此一旦达到该方法,任何人都可以猜测它何时会回来。

有人有什么想法或建议吗?

I have an issue with checking the signature of an XML file using .NET 3.5. It all works fine, but randomly the performance is poor. Sometimes it's instant and yet at other times it can take maybe 10 or 15 seconds to return.

I've checked the machine and nothing is going on to affect it's overall performance, and it's the same on different machines as well, so I don't think it's related to one machine.

I've narrowed it down precisely to the .CheckSignature() method, so once it hits that it's anybody's guess when it'll come back.

Anyone have any thoughts or advice?

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

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

发布评论

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

评论(1

纵情客 2024-08-26 03:27:51

回顾旧的未回答的问题,我想我应该发布一个更新,这可能对某人有用。

虽然我没有找到性能问题的答案,但我所做的是在一个单独的线程中启动签名验证,这允许我显示一个带有进度条的对话框,向用户显示正在发生的事情,而不是看似挂起的应用程序。

Looking back at old unanswered questions I thought I'd post an update to this that might prove useful to somebody.

Whilst I didn't find an answer to the performance issue, what I did was kick off the validation of the signature in a separate thread which allowed me to display a dialog box with a progress bar on it showing the user that something was happening, rather than the app seemingly hanging.

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