How to communicate from wpf to html 5 app? RRS feed

  • Question

  • Hi,

    I have a simple WPF app where  string messages  need  to be sent to HTML 5/(javascript) app.

    Which is the best way to transfer data.

    Also please point to any resources if available.

    Friday, January 25, 2013 9:15 AM


All replies

  • One way would be to use named pipes which was specifically invented for interprocess communication.

    JP Cowboy Coders Unite!

    Friday, January 25, 2013 10:57 PM
  • I came to know that accessing sockets for namedpipes/Tcp/Udp through javascript in Html5 is difficult. Through web sockets only Http requests can be handled from javascript. 

    Is this correct? If so please provide any links/resources to raise Http req and send string data from wpf app to Html 5 app. Any code help is greatly appreciated.

    • Edited by ykbharat Saturday, January 26, 2013 1:16 PM modified
    Saturday, January 26, 2013 1:15 PM
  • Hi,

    You can host a RESTful WCF service in the WPF process and let javascript call it via AJAX. Anyway it's not a WPF specific issue.

    To ask questions about WCF:


    To ask questions about calling HTTP service via AJAX:


    Allen Chen
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Min Zhu Tuesday, February 5, 2013 9:32 AM
    Tuesday, January 29, 2013 7:07 AM