You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ASP.NET Core Angular 2 template the Web API server method WeatherForecasts called twice on browser refresh (F5) of 'http://localhost:5000/fetch-data' page.
Steps to recreate
Add System.Threading.Thread.Sleep(TimeSpan.FromSeconds(10)); in the beginning of Web API method WeatherForecasts. (Or just set a breakpoint in WeatherForecasts and debug it).
You will notice that WeatherForecasts is called twice: once on the server during server-side prerendering and once from the browser's javascript after the page has being loaded.
Expected behavior
It should be only called once during server-side prerendering.
The text was updated successfully, but these errors were encountered:
Installed product versions
Description
In ASP.NET Core Angular 2 template the Web API server method WeatherForecasts called twice on browser refresh (F5) of 'http://localhost:5000/fetch-data' page.
Steps to recreate
Current behavior
You will notice that WeatherForecasts is called twice: once on the server during server-side prerendering and once from the browser's javascript after the page has being loaded.
Expected behavior
It should be only called once during server-side prerendering.
The text was updated successfully, but these errors were encountered: