Saturday, 15 August 2015

c# - WIF3.5 - WIF4.5: Where do I set SecurityTokenServiceConfiguration.TrustedEndpoints -



c# - WIF3.5 - WIF4.5: Where do I set SecurityTokenServiceConfiguration.TrustedEndpoints -

i have migrate stack built on wif 3.5 wif 4.5. it's bit of slow process, can't find much in way of detailed documentation on this.

i've nail blocker, , can't seem find how securitytokenserviceconfiguration.trustedendpoints migrated. have configuration class extends securitytokenserviceconfiguration

myconfiguration: securitytokenserviceconfiguration

in constructor there code establishes trusted endpoint:

//add transport security message credential endpoint this.trustendpoints.add(new servicehostendpointconfiguration( typeof(iwstrust13synccontract), new usernamewstrustbinding(securitymode.transportwithmessagecredential), "/mixed/username"));

i can't work out how equivalent in wif 4.5. have tips or suggestions?

thanks

try doing config file:

<service name="system.servicemodel.security.wstrustservicecontract" behaviorconfiguration="servicebehavior"> <endpoint address="iwstrust13" binding="ws2007httpbinding" contract="system.servicemodel.security.iwstrust13asynccontract" bindingconfiguration="ws2007httpbindingconfiguration"> <identity> <userprincipalname value="yourupn" /> </identity> </endpoint> <service/>

then define required binding.

<ws2007httpbinding> <binding name="ws2007httpbindingconfiguration"> <security mode="transportwithmessagecredential"> <message establishsecuritycontext="false" /> </security> </binding> </ws2007httpbinding>

you might need associate binding scheme. hope helps...

c# wif

No comments:

Post a Comment