I am working on a blazor application. When I debug locally, I have no issues.
However, when I deploy it to IIS (locally or on a server), the network tab of dev tools in Chrome shows a endless loop.
deployed in IIS screenshot (thousands of requests and growing):
My question(s): how can I figure out where this call is coming from? Can I turn of the encoding or something?
I added logging to my razor page events, and found the loop.
The OnAfterRenderAsync called another method which included a StateHasChanged. This resulted in an endless loop.
Reading about the component lifecycles here: https://blazor-university.com/components/component-lifecycles/
We can see OnAfterRenderAsync fires any time the state changes. So I had to basically remove any logic from OnAfterRenderAsync that would cause the state of the component to change.