Live Chat Icon For mobile
Live Chat Icon

How do I reconnect Blazor server-side automatically?

To reconnect the Blazor server automatically you need to include the following code in the script of the Blazor application. This will refresh the Blazor server automatically when it is up again.

[_Host.cshtml]

<script>
   Blazor.defaultReconnectionHandler._reconnectCallback = function(d) {
        document.location.reload(); 
   }
</script>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.