Maui mobile app using Signalr is encoding hub name in ConnectionData parameter on iOS 17

T_TDSi 10 Reputation points
2023-09-27T11:39:11.9033333+00:00

We have a mobile app in production built using Maui. The server running the api is it connecting to uses .net framework. There are issues connecting to signalR from iOS17 devices. From debug we can see the following:

iOS 17 device sets the connectionData variable to encoded.

https://gardisdemo.tdsi.co.uk:53198/signalr/negotiate?clientProtocol=2.1&**connectionData=%5B%257B%2522Name%2522:%2522EventLogHub%2522%257D%5D**&access_token=eyJ0eXAiOi......

iOS 16 device sets it correctly.

https://gardisdemo.tdsi.co.uk:53198/signalr/negotiate?clientProtocol=2.1&**connectionData=[{"Name":"EventLogHub"}]**&access_token=eyJ0eXAiOi.....

It there a way to get iOS 17 device to send the connectionData the same as an iOS 16 device?

Please help! The mobile application is in production.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,507 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,590 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Richard.R 5 Reputation points
    2024-04-25T12:13:59.4833333+00:00

    I've encountered the same issue and figured out, that it works if you add following to your .csproj file:

    <UseNativeHttpHandler>false</UseNativeHttpHandler>
    

    With this option your app uses the managed implementation of HttpMessageHandler instead of the default platform implementation.

    Hope this helps.

    1 person found this answer helpful.

  2. Filiberto Lopez 0 Reputation points
    2024-04-03T18:20:53.76+00:00

    Any update on this issue? Thank you

    0 comments No comments

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.