- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试让第三方 Java 客户端与我编写的 WCF 服务进行通信。
收到消息时出现如下异常:
Cannot find a token authenticator for the 'System.IdentityModel.Tokens.UserNameSecurityToken' token type. Tokens of that type cannot be accepted according to current security settings.
这是我的配置:
绑定(bind)
<customBinding>
<binding name="TestSecureBinding">
<security authenticationMode="MutualCertificate" />
<textMessageEncoding messageVersion="Soap11WSAddressing10" />
<httpsTransport requireClientCertificate="true" maxReceivedMessageSize="5242880" />
</binding>
</customBinding>
行为:
<serviceBehaviors>
<behavior name="TestCertificateBehavior">
<serviceCredentials>
<clientCertificate>
<certificate storeLocation="LocalMachine" x509FindType="FindBySubjectName" findValue="Test 01"/>
<authentication certificateValidationMode="PeerTrust" trustedStoreLocation="LocalMachine" revocationMode="NoCheck"/>
</clientCertificate>
<serviceCertificate storeLocation="LocalMachine" x509FindType="FindBySubjectName" findValue="Test 01"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
端点:
<service name="TestService"
behaviorConfiguration="TestCertificateBehavior">
<endpoint
name="TestEndpoint"
address="https://localhost:443"
contract="TestServiceContract"
binding="customBinding"
bindingConfiguration="TestSecureBinding">
</endpoint>
<host>
<baseAddresses>
<add baseAddress="https://localhost:443" />
</baseAddresses>
</host>
</service>
有人知道这是什么原因吗?
最佳答案
这是因为在某处使用了错误的证书引用方式,如果我没记错的话,您要么直接引用证书,要么使用 key 标识符 - 无论如何,要超越它,您应该能够添加 allowSerializedSigningTokenOnReply 标记到您的客户端绑定(bind)配置上的安全标签并将其设置为 true。
应该为你超越它 - 记住,把这个客户端放在一边
抱歉,我找不到引用资料 - 我记得在某处读过它,但现在找不到! :( ****编辑这里是**** - http://webservices20.blogspot.co.uk/2010/10/wcf-cannot-find-token-authenticator.html
<customBinding>
<binding name="TestSecureBinding">
<security allowSerializedSigningTokenOnReply="true" />
etc
</binding>
<customBinding>
关于wcf - 找不到 'System.IdentityModel.Tokens.UserNameSecurityToken' token 类型的 token 验证器。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12637921/
我正在使用 Forms Authentication 和 ASP.NET MVC 2 开发一个基于声明的授权系统。我看到一个命名空间“Microsoft.IdentityModel”提供了很多与另一个
我在使用 System.IdentityModel.Tokens 时遇到冲突: using System; using System.Configuration; using System.Data;
我可能不是第一个问但我们现在应该使用哪个?据我了解,它从一个非常小的 开始。系统 .IdentityModel 用于 WCF。然后是微软 .IdentityModel 类增加了很多。这是 http:/
我开始在我的项目中使用 ThinkTecture.IdentityModel,但我遇到了一个严重的问题。请帮助我。 错误 1“类型‘System.IdentityModel.Tokens.Securi
在遵循教程时 Create a RESTful API with authentication using Web API and Jwt我在编译 CustomJwtFormat 类时遇到问题: us
我们可以在 NuGet 库中找到两个独立的包: System.IdentityModel.Tokens.Jwt Microsoft.IdentityModel.Tokens 两者似乎都会定期更新并拥有
使用 .net 4.7 和 IdentityModel 的 Windows 服务应用程序。这是一个 Windows 服务:它在我的机器 (Windows 10) 上运行良好,但在 Windows Se
我是 .NET 的新手,目前正在通过关注 this tutorial 学习 ASP.NET Core MVC . 我的开发环境: Ubuntu 16.04.1 LTS .Net Core 1.0.0-
构建时我不断收到此错误: 无法识别的配置部分 system.identityModel 我已将以下内容添加到我的配置中:
我正在尝试在SharePoint Foundation 2010项目中使用 SPFederationAuthenticationModule 类。\我找不到 Microsoft.Sharepoint.
我已经更新了 System.IdentityModel.Tokens.jwt,它警告我在较低的代码块中使用“Audience”已过时。我做了一些研究,发现让观众前进的正确方法是: var valida
我已经更新了 System.IdentityModel.Tokens.jwt,它警告我在较低的代码块中使用“Audience”已过时。我做了一些研究,发现让观众前进的正确方法是: var valida
我已安装 Windows Identity Foundation,但找不到 Microsoft.IdentityModel dll。根据 Azure 动手实验室,它应该只是在 VS2010 中的“添加
我有一个使用 IdentityModel 中的 TokenClient 的新 MVC 项目 var tokenClient = new TokenClient(tokenUrl, clientId,
我正在尝试通过实现 UserNamePasswordValidator 来提供用户身份验证。我添加了 Microsoft.IdentityModel 和 System.IdentityModel.To
我正在尝试通过自定义类库使用 IdentityModel.dll。 我有一个 Web 服务(将作为 WSP 部署在 SharePoint 中),我想在其中使用 IdentityModel.Oidccl
如 leastprivilege 中所述,有两种方法可以使用 Thinktecture.IdentityModel 设置声明授权检查。一种是设置过滤器。另一种是为要检查的 Action 添加属性。 我
我有一个基于 TcpClient/TcpListener 和 SslStream 的简单客户端-服务器应用程序。客户端可以使用 X509Certificate 或在建立 SslStream 后发送用户
我最近被迫将我的 System.IdentityModel.Tokens.Jwt NuGet 包更新到 5.1.4,因为另一个 NuGet 包。更改后的大部分代码似乎很容易解决,但现在 Configu
我正在尝试使用 JWT token 验证用户。我在下面使用的代码在控制台应用程序中工作得很好。但是当我想在我的 Azure 函数中应用它时,它给我错误: 无法加载文件或程序集 Microsoft.Id
我是一名优秀的程序员,十分优秀!