Crash in Blazor app when accessing WebAssembly pages via mDNS (.local) hostname

evilC 0 Reputation points
2025-12-12T09:55:03.0466667+00:00

I a complete noob when it comes to ASP.Net and Blazor, so please be gentle with me...

I have set up the SignalR sample code - as far as I am aware, this is just a template Blazor app - the standard template Home, Counter, Calendar pages (Which are all server-side?) plus a Chat page (Which is WebAssembly)

I have deployed the code to a Raspberry Pi (Running DietPi)

The pi is connected via ethernet to my home network and I can access it via the DNS name dietpi just fine on my windows PC and on my Android phone (Phone connected via wifi to my home network, so it's still connecting to the pi via the ethernet interface)

The pi is also running a wireless hotspot. My use-case is such that what I wish to do at deploy-time is to connect my phone to the pi hotspot and access the app that way (I will be wearing the pi, so I will not be at home). When accessing in this mode, the pi's DNS name is dietpi.local (Rather than just dietpi when it is connected to the lan)

When I access the Blazor site via dietpi.local, the ?Server-side? (Home, Counter, Calendar) pages work fine, however accessing the Chat app (WebAssembly) causes a crash.

Here is a screenshot of the exception - note it says 'Name or service not known (dietpi.local:5000)'User's image The above is when accessing the Chat page via dietpi.local (Which I will need to do in production), but if I access the site from the same device as dietpi, the Chat page does not crash.

Any thoughts?

Developer technologies | ASP.NET | ASP.NET Core
{count} votes

Your answer

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