Update 07082021

This commit is contained in:
2021-08-07 09:44:37 +02:00
parent 1ff218a129
commit 4d443fdfd4
5663 changed files with 6581858 additions and 1321 deletions

View File

@@ -22,6 +22,7 @@ using Microsoft.AspNetCore.Components.Server;
using Radzen;
using Blazored.SessionStorage;
using BlazorApp.Helper;
using Microsoft.AspNetCore.Http;
namespace BlazorApp
{
@@ -56,7 +57,7 @@ namespace BlazorApp
services.AddScoped<TooltipService>();
services.AddScoped<ContextMenuService>();
services.AddBlazoredSessionStorage();
services.AddScoped<SessionState>();
//services.AddScoped<SessionState>();
// services.AddAuthentication("Identity.Application")
//.AddCookie();
@@ -95,6 +96,10 @@ namespace BlazorApp
services.AddScoped<ThemeState>();
services.AddScoped<ExampleService>();
services.AddScoped<MenuService>();
// services.AddScoped<SessionState>();
services.AddProtectedBrowserStorage();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -104,6 +109,7 @@ namespace BlazorApp
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
@@ -124,6 +130,24 @@ namespace BlazorApp
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
});
app.UseFastReport();
}
private async Task DeveloperLogin(HttpContext httpContext)
{
var UserManager = httpContext.RequestServices.GetRequiredService<UserManager<IdentityUser>>();
var signInManager = httpContext.RequestServices.GetRequiredService<SignInManager<IdentityUser>>();
var _user = await UserManager.FindByNameAsync("info@shub.ch");
await signInManager.SignInAsync(_user, isPersistent: false);
}
}
}