more stuff
This commit is contained in:
10
Program.cs
10
Program.cs
@@ -6,14 +6,14 @@ using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
var connectionString = builder.Configuration.GetConnectionString("DatabaseContextConnectionString") ?? throw new InvalidOperationException("Connection string 'DatabaseContextConnectionString' not found.");
|
||||
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection") ?? throw new InvalidOperationException("Connection string 'DefaultConnection' not found.");
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddRazorComponents()
|
||||
.AddInteractiveServerComponents();
|
||||
|
||||
builder.Services.AddDbContext<DatabaseContext>(options =>
|
||||
options.UseSqlite("Data Source=site.db"));
|
||||
options.UseSqlite(connectionString));
|
||||
|
||||
builder.Services.AddMemoryCache();
|
||||
builder.Services.AddLogging();
|
||||
@@ -45,6 +45,12 @@ builder.Services.AddIdentityCore<IdentityUser>(options => options.SignIn.Require
|
||||
.AddSignInManager()
|
||||
.AddDefaultTokenProviders();
|
||||
|
||||
builder.Services.AddServerSideBlazor()
|
||||
.AddHubOptions(options =>
|
||||
{
|
||||
options.MaximumReceiveMessageSize = 10 * 1024 * 1024; // 10MB
|
||||
});
|
||||
|
||||
builder.Services.AddSingleton<IEmailSender<IdentityUser>, IdentityNoOpEmailSender>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
Reference in New Issue
Block a user