什么是 .NET 4.5 等效于 UserNameWSTrustBinding? [英] What's the .NET 4.5 equivalent to UserNameWSTrustBinding?
本文介绍了什么是 .NET 4.5 等效于 UserNameWSTrustBinding?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在将活动配置文件 STS 转换为新的 .NET 4.5 System.IdentityModel 框架.我使用 UserNameWSTrustBinding 的代码似乎在新框架中不存在.任何建议.
I am converting a active profile STS to the new .NET 4.5 System.IdentityModel framework. My code using the UserNameWSTrustBinding which doesn't seem to exist in the new framework. Any suggestions.
推荐答案
虽然这是个老问题,但我在网上找不到任何非第三方的答案,所以在这里:
Although this is an old question, I couldn't find any non-third-party answer on the internet, so here it is:
要替换 .NET 4.5 中的 UserNameWSTrustBinding
,请使用以下内容:
To replace UserNameWSTrustBinding
in .NET 4.5, use the following:
var binding = new WS2007HttpBinding(SecurityMode.{what it was before});
binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
这篇关于什么是 .NET 4.5 等效于 UserNameWSTrustBinding?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文