Sharepoint 的证书问题

发布于 2024-10-10 06:53:50 字数 388 浏览 0 评论 0原文

我正在使用存储在机器和用户空间“myUser”中的证书来联系网络服务。 当我从 win 应用程序联系模拟“myUser”的网络服务时,一切正常。

但是,当我使用 Sharepoint 上下文(我只有 1 个前端)联系此问题时,我有时出现以下错误:

无法建立信任关系 用于 SSL/TLS 安全通道 权限 'server.host:4443'

我验证了 Web 服务是按预期使用用户“myUser”调用的,但在 Sharepoint 上下文中有时此方法会崩溃。

我不知道会出现什么问题。它似乎与 Sharepoint/ASP.NET 安全上下文有关,但一切似乎都很好。有什么建议吗?

I'm contacting a web service using a certificate stored in Machine and in user space "myUser".
When I contact the web service impersonating "myUser" from a win application all works well.

But when I contact this using Sharepoint context (I have only 1 frontend) I have only sometimes the following error:

Could not establish trust relationship
for the SSL/TLS secure channel with
authority 'server.host:4443'

I verified that the web service is invoked using user "myUser" as expected but in Sharepoint context sometimes this method crashes.

I don't know what can be the problem. It seems related to Sharepoint/ASP.NET security context but all seems to be ok. Any suggestion?

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

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

发布评论

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

评论(3

老旧海报 2024-10-17 06:53:50

我认为仅有时是这里的重点。

由于它在大多数情况下都可以工作,因此实际上设置和配置都没有问题。

您向其发送证书的计算机必须能够验证该证书。我的猜测是有时会出现问题。可能导致此问题的因素有:

  • 网络问题、防火墙...
  • AD 服务器关闭(我假设是自行颁发的证书)
  • AD 服务器太忙

检查 AD 和 Sharepoint 服务器的事件日志。

I think that the only sometimes is the important point here.

Since it works most of the time it is actually setup and configured ok.

The machine that you are sending the certificate to must be able to validate the certificate. My guess is that something is going wrong sometimes. Things that could cause this are:

  • a network problem, firewall ...
  • AD server down (I am assuming a self issued certificate)
  • AD server too busy

Check the event logs of your AD and Sharepoint server.

贪了杯 2024-10-17 06:53:50

您是否已授予对运行 SharePoint 的 asp.net 工作进程的证书的访问权限?

在 Windows 2008 中,您需要打开证书 mmc(开始 -> 运行 -> MMC -> 文件 -> 添加/删除 SnapIn -> 证书。当提示如何证书时,请务必选择“计算机帐户”找到该证书,右键单击它,选择“所有任务”,其中应该有一个选项允许您管理该证书的权限。 SharePoint 应用程序池正在运行

注意:如果您运行的是 Windows Server 2003,则需要使用 winhttpcertcfg.exe 配置证书权限。

Have you granted access to the certificate for the asp.net worker process under which SharePoint is running?

In Windows 2008, you need to open the certificates mmc (Start -> Run -> MMC -> File -> Add/Remove SnapIn -> Certificates. Be sure to select "Computer Account" when prompted for how certificates will be managed. Locate the certificate, right-click on it, select "All Tasks". There should be an option in there that allows you to manage permissions to the certificate. You will need to grant read access to the account under which the application pool for SharePoint is running.

Note: if you are running Windows Server 2003, you will need to use winhttpcertcfg.exe to configure certificate permissions.

和影子一齐双人舞 2024-10-17 06:53:50

尝试这样做:

System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true);

在拨打任何电话之前。

Try this:

System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true);

Before you make any calls.

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