Communicate from UWP app to a .net app in same machine

Madhu 96 Reputation points
2020-03-05T03:16:18.113+00:00

Hi,

I have a requirement that I need to call a method in a .net app running on the same machine from my UWP app. We were planning to do that with sockets. But just realized that there is a Windows restriction not allowing UWP to connect to other processes in the same machine.
So can you please tell me what is the standard way of doing such communication from a UWP app to another app (most probably a .net app) in the same machine?

Thanks
Madhu

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Richard Zhang-MSFT 6,936 Reputation points
    2020-03-05T06:02:24.637+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    For UWP apps, there are two main ways to communicate with other apps.

    1. Via URI Protocol.

    Calling each other through a link is a relatively simple way. You can set a special URI Schema for your application and pass parameters through the link.

    For specific creation methods, refer to this document

    2. Via AppService

    From document:

    App services are UWP apps that provide services to other UWP apps. They are analogous to web services, on a device. An app service runs as a background task in the host app and can provide its service to other apps.

    Both methods require you to be able to control the two applications that communicate (you need to write specific handlers for them), but you cannot directly access the data of other applications.

    Thanks.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful