prepare Web project for deployment

This commit is contained in:
Jonathan Jenne
2023-12-04 15:29:58 +01:00
parent 61c3a859c6
commit 562935e07e
4 changed files with 13 additions and 14 deletions

View File

@@ -19,7 +19,11 @@ namespace EnvelopeGenerator.Web
builder.Services.AddSingleton<EnvelopeService>();
// Add services to the container.
builder.Services.AddControllersWithViews();
builder.Services.AddControllersWithViews().AddJsonOptions(q =>
{
// Prevents serialization error when serializing SvgBitmap in EnvelopeReceiver
q.JsonSerializerOptions.ReferenceHandler = System.Text.Json.Serialization.ReferenceHandler.IgnoreCycles;
});
// Configure and start scheduler
builder.Services.AddQuartz(q =>