Blazor App Disconnects with Server after publishing using AZURE APP SERVICE

439 Views Asked by At

I am new bee to blazor, my blazor Web assembly app gets disconnected with the server after publishing it using azure app service it works fine for some time in development mode it says "An Unhandled Error has occurred Reload" and in console the error message shows such error enter image description here

Kindly let me know what am I doing wrong here I am using Visual studio 2022 and .NET 6 version , Thanks.

1

There are 1 best solutions below

0
On

I have deployed my .NET 3.1 Blazor Web App and currently the VS IDE and Azure Portal has no issues with the deployment/publishing to Azure App Service until there are any breaking changes in the code of the Web Application.

enter image description here enter image description here

As you mentioned only the error description which is 500 Internal Server Error is the generic error that comes when request is not reached to the server properly due to breaking code or timeouts, or server is not configured properly.

Also @Henk Holterman point is correct that logs will give the appropriate error paths where it is failing.

In Azure Portal > your Web App > Diagnose and Solve Problems > HTTP Server Errors > there you can see the errors if any 50X related errors are occurred.

enter image description here

  • Make Sure the build is successful without any errors.
  • Also, the packages/libraries used should be compatible with the configuration of Azure App service deployed like 32-bit/64-bit.
  • Check the Log Files in Kudu Portal of Azure App Service that includes web server logs, application logs, deployment logs, failure request logs, etc.,
  • Check this similar reference if your Blazor web app is hosted with authentication and got the 500 Internal Server HTTP Error, given by @puerile.
  • Refer the troubleshooting steps specifically for Unhandled Server exceptions in Blazor Web Apps given by Microsoft.