dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.63k stars 25.3k forks source link

Blazor app is not working after front door configuration #33056

Closed SreelekhaY closed 3 months ago

SreelekhaY commented 3 months ago

My Blazor app works fine in local. I had deployed the code to Azure and did front door configuration. For lower environments, it is working as expected with externalized url. (it is showing long pooling warning message - not a showstopper)

I followed the same process for production environment too but getting below errors. And any click action is not working.

Failed to load resource: the server responded with a status of 404 () /_blazor?id=63DnGjHrgl5FGiFjZqNRQ&=1720735158398
blazor.server.js:1 [2024-07-11T21:59:18.483Z] Error: Failed to start the transport 'LongPolling': Error: No Connection with that ID: Status code '404' log @ blazor.server.js:1 blazor.server.js:1
[2024-07-11T21:59:18.483Z] Error: Failed to start the connection: Error: Unable to connect to the server with any of the available transports. ServerSentEvents failed: Error: 'ServerSentEvents' does not support Binary. Error: LongPolling failed: Error: No Connection with that ID: Status code '404' log @ blazor.server.js:1 blazor.server.js:1
[2024-07-11T21:59:18.483Z] Error: Error: Unable to connect to the server with any of the available transports. ServerSentEvents failed: Error: 'ServerSentEvents' does not support Binary. Error: LongPolling failed: Error: No Connection with that ID: Status code '404' log @ blazor.server.js:1 blazor.server.js:1 [2024-07-11T21:59:18.484Z] Error: Failed to start the circuit.

Can you please help me out? Thank you!

guardrex commented 3 months ago

Hello @SreelekhaY ... BTW, please open issues from the bottom of an article using the Open a documentation issue link/feedback form at the bottom of the article. Use of the form adds metadata to your GitHub issue that cross-links the topic and pings the author automatically for a faster response.

WRT your ask, we thought that Front Door would work with Long Polling (example PU issue), but that doesn't seem to be the case. We certainly know that they never made Front Door work with WebSockets. We keep a NOTE on this here ...

https://learn.microsoft.com/en-us/aspnet/core/blazor/security/server/interactive-server-side-rendering?view=aspnetcore-8.0#client-connections

You can try opening a new issue for the product unit at https://github.com/dotnet/aspnetcore/issues and reference issue #50587 that didn't really get a final answer on Long Polling. I'm not sure if they'll be able to help. If you open an issue for them, please add ...

cc: @guardrex https://github.com/dotnet/AspNetCore.Docs/issues/33056

... to the bottom of your opening comment so that I can follow along. I might re-open this for doc work depending on what they say.