UWP to WCF service with message security username authentication. RRS feed

  • Question

  • Hi,

    I am working to connect to WCF service with Message security from UWP app. It is throwing below exception.

    System.PlatformNotSupportedException: TransportSecurityBindingElement.BuildChannelFactoryCore is not supported.

    My scenario is most similar to the issue :

    We are using nettcp requests to get the response.

    Issue is with the SecurityBindingElement.CreateUserNameOverTransportBindingElement(). 

    Do we have any approach to work with message security in UWP with Username and SSL authentication.

    Please let me know if need more information.

    Thank you,


    Monday, May 20, 2019 5:16 AM

All replies

  • Hi,

    First of all, UWP now is using .net core 2.0. And the API you are using SecurityBindingElement.CreateUserNameOverTransportBindingElement() is not supported in .net core 2.0. You could check it here:.NET API Browser.

    I'll move the thread to Windows Communication Foundation, Serialization, and Networking forum. You could get more professional support there.

    Best regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, May 20, 2019 8:34 AM
  • Hi NagarjunaBusireddy,
    WCF security mode, TransportWithMessageCredential is not supported by Core2.0+, you could refer to the following link.
    Feel free to let me know if there is anything I can help with.
    Best Regards
    Monday, May 20, 2019 10:03 AM
  • Thank you for the reply Abraham.

    With one of my requirement i need to use SecurityBindingElement.CreateUserNameOverTransportBindingElement(), Can we use the above method by referring to .net core 1.0?

    If yes, how can refer in UWP app. Currently i am using UWP targeted to Winodws 10 Fall Creators Update.

    We are upgrading Windows 8.1 app to UWP. Since WCF username authentication has been working in Windows 8.1 app, we have to provide the similar capability in upgraded UWP app.



    Tuesday, May 21, 2019 11:58 AM
  • Hi,

    Are you currently consuming services? If it is (calling the service by adding a service reference), then the UWP runtime environment is not allowed. I am not familiar with UWP. For web applications we can change the runtime environment explicitly. 
    At least for the moment, the UWP template I created does not support transport layer security.
    You can give feedback to the product group, refer to below discussion.

    Best Regards


    Wednesday, May 22, 2019 7:39 AM