You are not authorized to access this resource.
13 | } 14 |Sorry, there's nothing at this address.
25 |34 | | UserId | 35 |Username | 36 |Role | 38 |39 | | 40 | | |
---|---|---|---|---|---|---|
46 | @if (user.IsSuperUser)
47 | {
48 | |
57 |
58 | |
62 | @user.UserName | 63 |@user.Email | 64 |@user.UserRole | 65 |
66 | |
72 |
73 | |
81 |
87 | 90 | | 91 |
You're not authorized to view this page.
184 |Current count: @currentCount
8 | 9 | 10 | 11 | @code { 12 | private int currentCount = 0; 13 | 14 | private void IncrementCount() 15 | { 16 | currentCount++; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /BlazorAccountsManager/Client/Pages/FetchData.razor: -------------------------------------------------------------------------------- 1 | @page "/fetchdata" 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.WebAssembly.Authentication 4 | @using BlazorAccountsManager.Shared 5 | @attribute [Authorize] 6 | @inject HttpClient Http 7 | 8 |This component demonstrates fetching data from the server.
13 | 14 | @if (forecasts == null) 15 | { 16 |Loading...
17 | } 18 | else 19 | { 20 |Date | 24 |Temp. (C) | 25 |Temp. (F) | 26 |Summary | 27 |
---|---|---|---|
@forecast.Date.ToShortDateString() | 34 |@forecast.TemperatureC | 35 |@forecast.TemperatureF | 36 |@forecast.Summary | 37 |
@Error
11 |