我正在将活动配置文件STS转换为新的.NET 4.5 System.IdentityModel框架。我的代码使用UserNameWSTrustBinding,它似乎不存在于新框架中。任何建议。
答案 0 :(得分:4)
虽然这是一个老问题,但我无法在互联网上找到任何非第三方答案,所以这里是:
要替换.NET 4.5中的UserNameWSTrustBinding
,请使用以下命令:
var binding = new WS2007HttpBinding(SecurityMode.{what it was before});
binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
答案 1 :(得分:1)
我将WCF绑定移植到thinktecture身份模型:
https://github.com/thinktecture/Thinktecture.IdentityModel.45
答案 2 :(得分:0)
我也很难找到适合.NET 4.5的东西,而不是第三方库。但是我找到this link来获取您可以包含在项目中的代码。