c# - IssuedTokenAuthentication AudienceUriMode =“从不”

标签 c# wcf .net-4.0 migrate ws-federation

我已将 wcf 3.5 迁移到 4.0,但出现以下错误:

“处理消息中的安全 token 时发生错误”

谷歌搜索引导我找到这篇文章:

http://blog.latamhub.com/?cat=3

因此,我添加了以下行,问题得到解决:

<issuedTokenAuthentication audienceUriMode=”Never”>
</issuedTokenAuthentication>

我不知道它有什么作用。我正在使用 wsFederationHttpBinding。 有谁知道为什么现在有效吗?

在 wcf 3.5 中是默认值,而在 4.0 中则不是?

最佳答案

由于您正在使用 wsFederationHttpBinding,因此您需要为 SAML 安全 token 指定目标 uri。

如果没有看到服务模型代码,我无法告诉您为什么会发生这种情况。

您还应该启用 Microsoft.IdentityModel 和 ADFS 跟踪

查看http://msdn.microsoft.com/en-us/library/ms730908

& http://msdn.microsoft.com/en-us/library/ee517264.aspx

了解有关联合安全的更多信息。

关于c# - IssuedTokenAuthentication AudienceUriMode =“从不”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11472428/

相关文章:

c# - 使用 foreach (...) 语法,同时在循环内增加索引变量

c# - MVC4 中的 AttributeUsage 有什么作用

c# - 获取 wcf 服务的已连接客户端列表

c# - WCF 的不可序列化数据成员

c# - 什么时候更细粒度的锁定对性能更好?

c# - 如何在异步方法中调用 EndInvoke

c# - "Object reference not set to an instance of an object"in PresentationFramework with Live Shaping

c# - 调用 Restful Wcf 服务时出现 404 错误

javascript - LinkBut​​ton 有时需要点击两次

c# - 我如何模拟 Directory.GetFiles?