Receive only first Chat message, Maui 7 SignalR app in Hosting environment

Michael Nguyen 0 Reputation points
2023-06-20T00:45:24.4766667+00:00

Hello,

I'm building a .Net Maui v7 application based on the example provided below.

https://github.com/Skynet-Demos/SignalR-MAUI

Running locally with server and client works fine. Once I deploy the server app to my hosting provider and deploy the client maui app on to my Android device I would only get the first chat message on the phone.

I added OnConnectedAsync() & OnDisconnectedAsync() on the ChatHub application to write to db table log and see that my android app and the browser client made the proper connection throught the hub.

The issue is if I created the first chat in a desktop browser, then in my android app click on the entry field, I would then see this first message displayed in the Label field (as shown in example). However, hitting a reply from the android device will be shown only to the browser, not the android device.

If I type first a message from the android device, then it will show my message in the browser and the android device.

Subsequent messages from either the browser or the android app only updates the browser showing the new messages but not the android app.

Log shows both browser and android app are "connected" state to the ChatHub. I'm at a lost as to why this is the case and spent hours trying to figure this out but at a dead end.

Please let me know what am I missing?

Thank you.

-Michael.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,502 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,578 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
341 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.