SignedXml.CheckSignature 性能问题
我在使用 .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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回顾旧的未回答的问题,我想我应该发布一个更新,这可能对某人有用。
虽然我没有找到性能问题的答案,但我所做的是在一个单独的线程中启动签名验证,这允许我显示一个带有进度条的对话框,向用户显示正在发生的事情,而不是看似挂起的应用程序。
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.