locked
[UWP]Can a UWP App consume WCF services? RRS feed

  • Question

  • Trying to consumer a WCF service from a Windows 10 UWP app. It is failing with the following Error:

    PlatformNotSupportedException

    An exception of type 'System.Platform.NotSupportedException' occured in System.Private.ServiceModel.dll but was not handled in user code.


    Rami Sarieddine Technical Evangelist


    • Edited by Barry Wang Thursday, January 28, 2016 7:51 AM title tag
    Wednesday, January 27, 2016 2:37 PM

Answers

  • Hi Rami -- it is definitely possible.  Most of my UWP apps consume WCF services.  In August of last year a similar discussion occurred and it was due to use of NetTCP bindings with credentials which UWP did not support at that time.  Link here
    • Proposed as answer by Barry Wang Thursday, February 4, 2016 3:00 AM
    • Marked as answer by Barry Wang Monday, February 15, 2016 9:43 AM
    Wednesday, January 27, 2016 3:48 PM
  • Rami, could you use httpbinding or a different mechanism for authentication (i.e. tokens?)

    • Proposed as answer by Barry Wang Thursday, February 4, 2016 3:00 AM
    • Marked as answer by Barry Wang Monday, February 15, 2016 9:43 AM
    Friday, January 29, 2016 8:34 PM

All replies

  • Hi Rami -- it is definitely possible.  Most of my UWP apps consume WCF services.  In August of last year a similar discussion occurred and it was due to use of NetTCP bindings with credentials which UWP did not support at that time.  Link here
    • Proposed as answer by Barry Wang Thursday, February 4, 2016 3:00 AM
    • Marked as answer by Barry Wang Monday, February 15, 2016 9:43 AM
    Wednesday, January 27, 2016 3:48 PM
  • Thanks. so if the issue was due to support of NetTCP bindings with credentials. what is the recommended way to do so now? couldn't find any documentation for that on the dev center.

    Rami Sarieddine Technical Evangelist

    Friday, January 29, 2016 6:14 PM
  • Rami, could you use httpbinding or a different mechanism for authentication (i.e. tokens?)

    • Proposed as answer by Barry Wang Thursday, February 4, 2016 3:00 AM
    • Marked as answer by Barry Wang Monday, February 15, 2016 9:43 AM
    Friday, January 29, 2016 8:34 PM
  • Security support for WCF on UWP seems to be pretty limited...

    As far as I know, the only way to authenticate with credentials is with a custom username password authenticator on the server side, but UWP does not yet support this.

    I've added a wish list item for this:

    WCF Username Password Authentication

    Wednesday, February 24, 2016 4:44 AM