2022-12-31 08:35:05.1941||DEBUG|DiscountService.Program|init main function 2022-12-31 08:35:07.7615|10403|INFO|Microsoft.EntityFrameworkCore.Infrastructure|Entity Framework Core 3.1.11 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies 2022-12-31 08:35:08.0928|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (12ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT 1 2022-12-31 08:35:08.1107|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (11ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); 2022-12-31 08:35:08.1107|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT 1 2022-12-31 08:35:08.1107|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); 2022-12-31 08:35:08.1289|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT [MigrationId], [ProductVersion] FROM [__EFMigrationsHistory] ORDER BY [MigrationId]; 2022-12-31 08:35:08.1402|20405|INFO|Microsoft.EntityFrameworkCore.Migrations|No migrations were applied. The database is already up to date. 2022-12-31 08:35:08.3302|50|WARN|Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository|Using an in-memory repository. Keys will not be persisted to storage. 2022-12-31 08:35:08.3302|59|WARN|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits. 2022-12-31 08:35:08.3302|58|INFO|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|Creating key {ba8480d2-b4f8-41ae-acb4-49764300029f} with creation date 2022-12-31 07:35:08Z, activation date 2022-12-31 07:35:08Z, and expiration date 2023-03-31 07:35:08Z. 2022-12-31 08:35:08.3302|35|WARN|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|No XML encryptor configured. Key {ba8480d2-b4f8-41ae-acb4-49764300029f} may be persisted to storage in unencrypted form. 2022-12-31 08:35:08.6047|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/1.1 GET http://api.skilldorm.com/discount/api/Discount/GetDiscountCode?code=IC-SKD50&courseId=257 2022-12-31 08:35:09.0476|2|INFO|Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler|Successfully validated the token. 2022-12-31 08:35:09.0660|1|INFO|Microsoft.AspNetCore.Authorization.DefaultAuthorizationService|Authorization was successful. 2022-12-31 08:35:09.0660|0|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executing endpoint 'DiscountService.Controllers.DiscountController.GetDiscountCode (DiscountService)' 2022-12-31 08:35:09.0933|3|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Route matched with {action = "GetDiscountCode", controller = "Discount"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] GetDiscountCode(System.String, Int64) on controller DiscountService.Controllers.DiscountController (DiscountService). 2022-12-31 08:35:09.0961|10403|INFO|Microsoft.EntityFrameworkCore.Infrastructure|Entity Framework Core 3.1.11 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies 2022-12-31 08:35:09.1308|10403|INFO|Microsoft.EntityFrameworkCore.Infrastructure|Entity Framework Core 3.1.11 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies 2022-12-31 08:35:09.2888|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (28ms) [Parameters=[@__Trim_0='?' (Size = 4000)], CommandType='Text', CommandTimeout='30'] SELECT TOP(1) [d].[Code], [d].[DiscountId], [d].[IsActive], [d0].[Name], [d0].[AllCoursesDiscount], [d0].[Amount], [d0].[Description], [d0].[StartDate], [d0].[EndDate], [d0].[DiscountChargeType], [d0].[InstitutionId], [d0].[SetUsageLimit], [d0].[UsageLimit], [d0].[UsageCount] FROM [DiscountCodes] AS [d] INNER JOIN [Discounts] AS [d0] ON [d].[DiscountId] = [d0].[Id] WHERE [d].[Code] = @__Trim_0 2022-12-31 08:35:09.3047|1|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor|Executing ObjectResult, writing value of type 'CommonBase.Model.SaveResponse'. 2022-12-31 08:35:09.3333|2|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executed action DiscountService.Controllers.DiscountController.GetDiscountCode (DiscountService) in 237.5877ms 2022-12-31 08:35:09.3333|1|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executed endpoint 'DiscountService.Controllers.DiscountController.GetDiscountCode (DiscountService)' 2022-12-31 08:35:09.3333|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished in 732.5479ms 200 application/json; charset=utf-8 2022-12-31 08:47:33.9526|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/1.1 GET http://api.skilldorm.com/discount/api/Discount/GetDiscountCode?code=IC-SKD50&courseId=257 2022-12-31 08:47:33.9526|2|INFO|Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler|Successfully validated the token. 2022-12-31 08:47:33.9580|1|INFO|Microsoft.AspNetCore.Authorization.DefaultAuthorizationService|Authorization was successful. 2022-12-31 08:47:33.9580|0|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executing endpoint 'DiscountService.Controllers.DiscountController.GetDiscountCode (DiscountService)' 2022-12-31 08:47:33.9580|3|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Route matched with {action = "GetDiscountCode", controller = "Discount"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] GetDiscountCode(System.String, Int64) on controller DiscountService.Controllers.DiscountController (DiscountService). 2022-12-31 08:47:33.9580|10403|INFO|Microsoft.EntityFrameworkCore.Infrastructure|Entity Framework Core 3.1.11 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies 2022-12-31 08:47:33.9580|10403|INFO|Microsoft.EntityFrameworkCore.Infrastructure|Entity Framework Core 3.1.11 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies 2022-12-31 08:47:33.9580|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (1ms) [Parameters=[@__Trim_0='?' (Size = 4000)], CommandType='Text', CommandTimeout='30'] SELECT TOP(1) [d].[Code], [d].[DiscountId], [d].[IsActive], [d0].[Name], [d0].[AllCoursesDiscount], [d0].[Amount], [d0].[Description], [d0].[StartDate], [d0].[EndDate], [d0].[DiscountChargeType], [d0].[InstitutionId], [d0].[SetUsageLimit], [d0].[UsageLimit], [d0].[UsageCount] FROM [DiscountCodes] AS [d] INNER JOIN [Discounts] AS [d0] ON [d].[DiscountId] = [d0].[Id] WHERE [d].[Code] = @__Trim_0 2022-12-31 08:47:33.9580|1|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor|Executing ObjectResult, writing value of type 'CommonBase.Model.SaveResponse'. 2022-12-31 08:47:33.9725|2|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executed action DiscountService.Controllers.DiscountController.GetDiscountCode (DiscountService) in 13.46ms 2022-12-31 08:47:33.9725|1|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executed endpoint 'DiscountService.Controllers.DiscountController.GetDiscountCode (DiscountService)' 2022-12-31 08:47:33.9725|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished in 20.5034ms 200 application/json; charset=utf-8 2022-12-31 08:47:34.4755|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/1.1 PUT http://api.skilldorm.com/discount/api/Discount/UpdateDiscountCodeUsage?count=1&discountCode=IC-SKD50 0 2022-12-31 08:47:34.4755|0|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executing endpoint 'DiscountService.Controllers.DiscountController.UpdateDiscountCodeUsage (DiscountService)' 2022-12-31 08:47:34.4755|3|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Route matched with {action = "UpdateDiscountCodeUsage", controller = "Discount"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] UpdateDiscountCodeUsage(Int32, System.String) on controller DiscountService.Controllers.DiscountController (DiscountService). 2022-12-31 08:47:34.4755|10403|INFO|Microsoft.EntityFrameworkCore.Infrastructure|Entity Framework Core 3.1.11 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies 2022-12-31 08:47:34.5073|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (1ms) [Parameters=[@__Trim_0='?' (Size = 4000)], CommandType='Text', CommandTimeout='30'] SELECT TOP(1) [d0].[Id], [d0].[AllCoursesDiscount], [d0].[Amount], [d0].[CreatedBy], [d0].[DateCreated], [d0].[DateModified], [d0].[Description], [d0].[DiscountChargeType], [d0].[EndDate], [d0].[InstitutionId], [d0].[IsActive], [d0].[IsDeleted], [d0].[ModifiedBy], [d0].[Name], [d0].[SetUsageLimit], [d0].[StartDate], [d0].[UsageCount], [d0].[UsageLimit] FROM [DiscountCodes] AS [d] INNER JOIN [Discounts] AS [d0] ON [d].[DiscountId] = [d0].[Id] WHERE [d].[Code] = @__Trim_0 2022-12-31 08:47:34.5470||ERROR|DiscountService.Controllers.DiscountController|Object reference not set to an instance of an object. 2022-12-31 08:47:34.5470|1|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor|Executing ObjectResult, writing value of type 'CommonBase.Model.SaveResponse'. 2022-12-31 08:47:34.5470|2|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executed action DiscountService.Controllers.DiscountController.UpdateDiscountCodeUsage (DiscountService) in 67.0353ms 2022-12-31 08:47:34.5470|1|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executed endpoint 'DiscountService.Controllers.DiscountController.UpdateDiscountCodeUsage (DiscountService)' 2022-12-31 08:47:34.5470|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished in 74.4767ms 200 application/json; charset=utf-8 2022-12-31 09:13:24.8797|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/1.1 POST http://127.0.0.1:29457/DISCOUNT/iisintegration 0 2022-12-31 09:13:24.8797|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished in 1.0322ms 202