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.
Asked
Active
Viewed 4,239 times
16
-
3I would love to know where this is as well. Or what the workaround is...not really wanting to install a third party Thinktecture resource. – Steve Jul 19 '13 at 20:03
-
1Google searches yield umpteen results for ".net 4.5" examples that USE UserNameWSTrustBinding, despite MSDN being very clear that it has been deprecated. So, I'm with you, I'd desperately like to know how you're supposed to go about this in 4.5 – ctb Feb 26 '14 at 17:32
3 Answers
4
Although this is an old question, I couldn't find any non-third-party answer on the internet, so here it is:
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;

molnarm
- 9,856
- 2
- 42
- 60
1
I ported the WCF bindings to thinktecture identity model:
https://github.com/thinktecture/Thinktecture.IdentityModel.45

leastprivilege
- 18,196
- 1
- 34
- 50