info: TAFThermalPrinter.ThermalPrinterService[0] Found thermal printer: 80mm Thermal Printer info: TAFThermalPrinter.ThermalPrinterService[0] V Auto-detected thermal printer: 80mm Thermal Printer fail: TAFThermalPrinter.ThermalPrinterService[0] Failed to save config System.InvalidOperationException: Reflection-based serialization has been disabled for this application. Either use the source generator APIs or explicitly configure the 'JsonSerializerOptions.TypeInfoResolver' property. at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_JsonSerializerIsReflectionDisabled() at System.Text.Json.JsonSerializerOptions.ConfigureForJsonSerializer() at System.Text.Json.JsonSerializerOptions.MakeReadOnly(Boolean) at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions, Type) at System.Text.Json.JsonSerializer.GetTypeInfo[T](JsonSerializerOptions) at System.Text.Json.JsonSerializer.Serialize[TValue](TValue, JsonSerializerOptions ) at TAFThermalPrinter.ThermalPrinterService.SaveConfig(PrinterConfig) info: TAFThermalPrinter[0] ========================================== info: TAFThermalPrinter[0] ??? TAF Thermal Printer Service Started (C#) info: TAFThermalPrinter[0] ========================================== info: TAFThermalPrinter[0] ?? Server running on port 3001 info: TAFThermalPrinter[0] ?? Health check: http://localhost:3001/health info: TAFThermalPrinter[0] ??? Printer: 80mm Thermal Printer info: TAFThermalPrinter[0] ========================================== warn: Microsoft.AspNetCore.Server.Kestrel[0] Overriding address(es) 'http://localhost:3001'. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead. info: Microsoft.Hosting.Lifetime[14] Now listening on: http://localhost:3001 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Production info: Microsoft.Hosting.Lifetime[0] Content root path: D:\Printer fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HNHO7GM8KB17", Request id "0HNHO7GM8KB17:00000001": An unhandled exception was thrown by the application. System.NotSupportedException: JsonTypeInfo metadata for type 'ReceiptRequest' was not provided by TypeInfoResolver of type '[]'. If using source generation, ensure that all root types passed to the serializer have been annotated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically. at System.Text.Json.ThrowHelper.ThrowNotSupportedException_NoMetadataForType(Type, IJsonTypeInfoResolver) at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type, Boolean , Nullable`1 , Boolean , Boolean ) at System.Text.Json.JsonSerializerOptions.GetTypeInfo(Type) at Microsoft.AspNetCore.Http.Generated.F421C5265036DB17E273B6584DBCEA0AD7C4083600A10393B92569F0E7BE2D501__GeneratedRouteBuilderExtensionsCore.ResolveJsonBodyOrService[T](F421C5265036DB17E273B6584DBCEA0AD7C4083600A10393B92569F0E7BE2D501__LogOrThrowExceptionHelper, String, String, JsonSerializerOptions, IServiceProviderIsService ) at Microsoft.AspNetCore.Http.Generated.F421C5265036DB17E273B6584DBCEA0AD7C4083600A10393B92569F0E7BE2D501__GeneratedRouteBuilderExtensionsCore.<>c.b__4_1(Delegate del, RequestDelegateFactoryOptions options, RequestDelegateMetadataResult inferredMetadataResult) at Microsoft.AspNetCore.Routing.RouteEndpointDataSource.CreateRouteEndpointBuilder(RouteEntry, RoutePattern , IReadOnlyList`1 , IReadOnlyList`1 ) at Microsoft.AspNetCore.Routing.RouteEndpointDataSource.get_Endpoints() at Microsoft.AspNetCore.Routing.CompositeEndpointDataSource.CreateEndpointsUnsynchronized() at Microsoft.AspNetCore.Routing.CompositeEndpointDataSource.EnsureEndpointsInitialized() at Microsoft.AspNetCore.Routing.CompositeEndpointDataSource.get_Endpoints() at Microsoft.AspNetCore.Routing.DataSourceDependentCache`1.Initialize() at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& , Boolean&, Object& , Func`1) at System.Threading.LazyInitializer.EnsureInitialized[T](T& , Boolean&, Object& , Func`1) at Microsoft.AspNetCore.Routing.DataSourceDependentCache`1.EnsureInitialized() at Microsoft.AspNetCore.Routing.Matching.DataSourceDependentMatcher..ctor(EndpointDataSource, Lifetime, Func`1) at Microsoft.AspNetCore.Routing.Matching.DfaMatcherFactory.CreateMatcher(EndpointDataSource) at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.InitializeCoreAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.g__AwaitMatcher|10_0(EndpointRoutingMiddleware, HttpContext, Task`1) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1)