SharePoint 2010 SecurityTokenService 错误

发布于 2024-11-27 01:04:41 字数 482 浏览 0 评论 0原文

我们的测试环境中有 SharePoint 2010,使用自定义 STS(联合,并且所有站点都是基于声明的)。 当我们尝试登录该网站时,我们会被重定向到 sts 登录页面,输入凭据,然后被定向到 siteurl/_trust ,它会在这里停留很长时间并超时。 在Windows应用程序错误中,我们看到的是: 异常类型:TimeoutException 异常消息:对“http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc”的 HTTP 请求已超过分配的超时 00:00:59.9840000。分配给此操作的时间可能是较长超时的一部分。

另一个错误为:

尝试颁发安全令牌时发生异常:请求通道在 00:00:59.9843751 之后等待回复时超时。增加传递给 Request 调用的超时值或增加 Binding 上的 SendTimeout 值。分配给此操作的时间可能是较长超时的一部分。

有什么想法吗?

We have SharePoint 2010 in our testing environment, working a with a custom STS (federation , and all sites are claimsbased).
When we try to login to the site, we are redirected to the sts login page, we put in the credentials, we are directed to siteurl/_trust and it stays here for a long time and it times out.
In the windows application error, this is what we see:
Exception type: TimeoutException
Exception message: The HTTP request to 'http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc' has exceeded the allotted timeout of 00:00:59.9840000. The time allotted to this operation may have been a portion of a longer timeout.

Another error reads:

An exception occurred when trying to issue security token: The request channel timed out while waiting for a reply after 00:00:59.9843751. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout..

Any ideas?

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

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

发布评论

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

评论(2

李白 2024-12-04 01:04:41

SecurityTokenService 是一项 WCF 服务,您可以为该服务设置超时,就像任何其他 WCF 服务一样。

说到SharePoint 2010。我发现14个hive文件夹中有两个文件夹:WebClients和WebServices。这些文件夹包含 SecurityToken 子文件夹。

要更改超时,您需要将 receiveTimeout 和 sendTimeout 属性添加到绑定元素中,以获得如下内容:

<binding name="spStsBinding" receiveTimeout="00:30:00" sendTimeout="00:30:00">
...
</binding>

我已对 14\WebClients\SecurityToken\client.config 和 14\WebServices\SecurityToken\web.config 文件中的所有绑定执行此操作。上述设置将超时设置为 30 分钟。

为了编辑服务配置文件,我使用了 VS 2008 中的一个工具,如下面的屏幕截图所示:

在此处输入图像描述

我希望它有帮助。

SecurityTokenService is a WCF service and you can set timeouts for the service just like for any other WCF service.

Speaking about SharePoint 2010. I have found that there are two folders in 14 hive folder: WebClients and WebServices. These folders contain SecurityToken subfolders.

To change timeouts you need to add the receiveTimeout and sendTimeout attributes into binding element to have something like this:

<binding name="spStsBinding" receiveTimeout="00:30:00" sendTimeout="00:30:00">
...
</binding>

I have done it for all bindings in both 14\WebClients\SecurityToken\client.config and 14\WebServices\SecurityToken\web.config files. The settings above set timeouts to 30 minutes.

To edit the service config files I have used a tool from VS 2008 shown on the following screenshot:

enter image description here

I hope it helps.

与君绝 2024-12-04 01:04:41

当您的应用程序使用 SecurityTokenService 时,Antipod 建议的解决方案确实有效。但是,当例如从搜索应用程序请求时,它不起作用。例如,核心结果搜索 Web 部件调用搜索服务应用程序,后者调用安全令牌服务。

在这种情况下,调用 SPSecurityContext.SecurityTokenForContext 方法并请求 SecurityTokenService。在这种情况下,不会应用绑定超时,因为 SecurityTokenService WCF 绑定是通过以下方式初始化的:

s_CachedActAsStsBinding = new CustomBinding(bindingElementsInTopDownChannelStackOrder);

其中,bingingElementsInTopDownChannelStackOrder 是从 14\WebClients 文件夹中的配置中获取的,但不应用超时参数。

您可以尝试此处建议的解决方案:http://www.eventid.net/display.asp?eventid=8306&eventno=10757&source=Microsoft-SharePoint%20Products-SharePoint%20Foundatio&phase=1但不幸的是他们不适合我。

The solution suggested by Antipod does work when SecurityTokenService is used by your application. However, it doesn't work when it's requested e.g. from Search Application. For example Core Results Search Web Part calls Search Service Application which calls Security Token Service.

In this case SPSecurityContext.SecurityTokenForContext method is called and it requests SecurityTokenService. In this case binding timeouts are not applied because SecurityTokenService WCF binding is initialized in following way:

s_CachedActAsStsBinding = new CustomBinding(bindingElementsInTopDownChannelStackOrder);

where bindingElementsInTopDownChannelStackOrder are taken from configuration in 14\WebClients folder but timeout parameters are not applied.

You can try solutions suggested here: http://www.eventid.net/display.asp?eventid=8306&eventno=10757&source=Microsoft-SharePoint%20Products-SharePoint%20Foundatio&phase=1 but unfortunately they didn't work for me.

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