Using the HttpContext in Blazor Server the right way

Codewrinkles
Codewrinkles
12.1 هزار بار بازدید - 2 سال پیش - In one of the previous
In one of the previous videos we have showed how can we access the HttpContext in different #AspNetCore app types. Blazor Server gets its own video as the Blazor hosting model is so different that it needs a more detailed attention. The major problem is that in Blazor Server we can't access the HttpContext directly, as it is not guaranteed that IHttpContextAccessor will have an instance of the context and it is also not guaranteed that if it has an instance, it is the one that was used when creating the circuit. In this video we take a deeper look at the Blazor hosting model to then showcase how we can take a snapshot of the HttpContext information and make it available to the entire Blazor Server app.
#Blazor

Chapters
1. Intro: 00:00
2. What's different in the Blazor Server hosting model? 00:46
3. The Blazor Server hosting model in action: 04:11
4. Can we use HttpContext in Blazor components? 14:33
5. Creating services and initial application state: 17:20
6. Capturing HttpContext snapshot: 19:22
7. Passing captured HttpContext state to the Blazor root component: 22:29
8. Using state information in Blazor components: 25:55
2 سال پیش در تاریخ 1400/11/03 منتشر شده است.
12,187 بـار بازدید شده
... بیشتر