Connect desktop application with mobile

Sanya Anishchik 41 Reputation points
2021-09-30T11:30:00.227+00:00

I have desktop POS .NET application and mobile report application. I need to connect them and send report from POS to mobile by mobile request.
Because PC and mobile are placed under NAT with dynamic IP I cannot do any calls directly by http request. I implemented Azure SignalR Service and connected mobile and PC so now I can call each other.
But the problem in size of socket message - too small to transmit whole report (can be 1mb+).
Is there any workaround or azure service that can help me achieve this goal? I also think about generation and putting report in Azure Blob Storage by request and just transmit link instead of report from POS to mobile

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,323 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,506 Reputation points
    2021-10-01T07:29:08.437+00:00

    Hello SanyaAnishchik-6350,

    Thank you for your question and for getting in touch.

    Here's a suggestion on how to fix and make this type of connection:

    In your desktop app, you can use an object of the HttpListener class: https://learn.microsoft.com/en-us/dotnet/api/system.net.httplistener?redirectedfrom=MSDN&view=net-5.0 and in your app mobile, you can call the url (using a web client object) from your desktop app. At the bottom of the link page you can find an example of HttpListener.

    In the link mentioned above you will find an example of how to use HttpListener.

    ---------------------------------------------------------------------------------------------------------------------------

    If the answer is helpful, please vote positively and accept as an answer.


  2. Lex Li (Microsoft) 5,237 Reputation points Microsoft Employee
    2023-04-02T06:10:42.1866667+00:00

    SignalR is usually used as a channel to pass messages among different subscribers (your desktop app and mobile app for example).

    Like you discovered, if large files need to be shared, it would be better for each subscribers to upload files to a service like Azure Files REST API https://learn.microsoft.com/en-us/azure/storage/files/storage-files-introduction then they can use SignalR to simply share the file links.

    0 comments No comments