Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My Server Side Blazor app's Counter isn't incrementing when deployed to Azure

I newed up a server side Blazor project (formerly Razor Components) via dotnet new razorcomponents -o MySampleApp. It works as expected on my machine, when when I right click and attempt to publish to Azure, it fails with a

HTTP Error 503. The service is unavailable.

I solved this by using the "Self-Contained" Deployment Mode, which gets me to the expected Blazor example home page. The weather forecast page works, but the counter page fails to increment. How can I fix this?

like image 447
DharmaTurtle Avatar asked Apr 09 '19 22:04

DharmaTurtle


People also ask

Is Blazor server fast?

Server Pros One of the biggest positives of Blazor Server is load & render times. Since users aren't downloading the runtime or application libraries, they can start using the application faster. Getting started with Blazor Server is much faster because you're writing the same C# code you would regardless.

How many users can Blazor server handle?

We published a GitHub example that shows how to deploy an XAF Blazor application to a Kubernetes cluster with horizontal autoscaling. We tested the application in two types of clusters: locally-run K3s and Azure Kubernetes Service (AKS). The maximum pod replica number (20) allowed around 300 concurrent users.


1 Answers

I needed to turn on websockets. Duh.

I found it under portal.azure.com > MySampleApp app service > Configuration > General Settings > Web sockets.

Also, apparently I can install the ASP.NET Core 3.0 Runtime in Extensions, which means I can go back to "Framework-Dependent" as a Deployment Mode. This video was a great help: https://www.youtube.com/watch?v=GfazTDXH6JA

like image 155
DharmaTurtle Avatar answered Oct 22 '22 01:10

DharmaTurtle