Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the .NET 4.5 equivalent to UserNameWSTrustBinding?

Tags:

.net-4.5

wif

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.

like image 770
user2009176 Avatar asked Jan 24 '13 22:01

user2009176


2 Answers

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;
like image 96
molnarm Avatar answered Nov 16 '22 15:11

molnarm


I ported the WCF bindings to thinktecture identity model:

https://github.com/thinktecture/Thinktecture.IdentityModel.45

like image 1
leastprivilege Avatar answered Nov 16 '22 15:11

leastprivilege