Last post Oct 11, 2018 12:29 PM by Widder
Sep 14, 2018 08:23 AM|Widder|LINK
I am tinkering a little bit with WCF-service programming and tried to configure a CustomBinding in the web.config of the project in Visual Studio.
I looked at https://docs.microsoft.com/de-de/dotnet/framework/configure-apps/file-schema/wcf/issuedtokenparameters but can not use the attribute inclusionMode and also some others which are shown in the docs. VS tells me "The inclusionMode-attribute is now
How can I use it or what am I missing that I cannot use it?
Sep 24, 2018 10:52 AM|Abraham Qian|LINK
When you create a custom binding, you need to assign the SecurityBindingElement to the following types, then you could use the IssuedSecurityTokenParameters.
I have made a demo, wish it is useful to you.
TextMessageEncodingBindingElement encoding = new TextMessageEncodingBindingElement();
HttpTransportBindingElement transport = new HttpTransportBindingElement();
IssuedSecurityTokenParameters parameters = new IssuedSecurityTokenParameters();
parameters.DefaultMessageSecurityVersion = MessageSecurityVersion.Default;
parameters.InclusionMode = SecurityTokenInclusionMode.Once;
SecurityBindingElement security = SecurityBindingElement.CreateIssuedTokenOverTransportBindingElement(parameters);
CustomBinding binding = new CustomBinding(encoding, transport,security);
Here is an official document.
Feel free to let me know if you have any questions.
Oct 11, 2018 12:29 PM|Widder|LINK
thank you very much for your replay. I will try out and give a status update.