2023-03-03 22:46:30.3671||DEBUG|DiscountService.Program|init main function 2023-03-03 22:46:33.4163|10403|INFO|Microsoft.EntityFrameworkCore.Infrastructure|Entity Framework Core 3.1.11 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies 2023-03-03 22:46:33.7657|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (12ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT 1 2023-03-03 22:46:33.7836|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (11ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); 2023-03-03 22:46:33.7883|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT 1 2023-03-03 22:46:33.7883|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); 2023-03-03 22:46:33.7883|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT [MigrationId], [ProductVersion] FROM [__EFMigrationsHistory] ORDER BY [MigrationId]; 2023-03-03 22:46:33.8133|20405|INFO|Microsoft.EntityFrameworkCore.Migrations|No migrations were applied. The database is already up to date. 2023-03-03 22:46:34.0141|50|WARN|Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository|Using an in-memory repository. Keys will not be persisted to storage. 2023-03-03 22:46:34.0141|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. 2023-03-03 22:46:34.0209|58|INFO|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|Creating key {2684ee10-fdbe-4ddf-b4ad-e985e9fdf3c5} with creation date 2023-03-03 21:46:34Z, activation date 2023-03-03 21:46:34Z, and expiration date 2023-06-01 21:46:34Z. 2023-03-03 22:46:34.0209|35|WARN|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|No XML encryptor configured. Key {2684ee10-fdbe-4ddf-b4ad-e985e9fdf3c5} may be persisted to storage in unencrypted form. 2023-03-03 22:46:34.2341|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/1.1 GET http://api.skilldorm.com/discount/api/Discount/GetDiscountCode?code=IC-SKD50&courseId=255 2023-03-03 22:46:34.7129|2|INFO|Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler|Successfully validated the token. 2023-03-03 22:46:34.7316|1|INFO|Microsoft.AspNetCore.Authorization.DefaultAuthorizationService|Authorization was successful. 2023-03-03 22:46:34.7316|0|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executing endpoint 'DiscountService.Controllers.DiscountController.GetDiscountCode (DiscountService)' 2023-03-03 22:46:34.7582|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). 2023-03-03 22:46:34.7582|10403|INFO|Microsoft.EntityFrameworkCore.Infrastructure|Entity Framework Core 3.1.11 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies 2023-03-03 22:46:34.7963|10403|INFO|Microsoft.EntityFrameworkCore.Infrastructure|Entity Framework Core 3.1.11 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies 2023-03-03 22:46:34.9610|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (30ms) [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 2023-03-03 22:46:34.9771|1|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor|Executing ObjectResult, writing value of type 'CommonBase.Model.SaveResponse'. 2023-03-03 22:46:35.0011|2|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executed action DiscountService.Controllers.DiscountController.GetDiscountCode (DiscountService) in 240.332ms 2023-03-03 22:46:35.0011|1|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executed endpoint 'DiscountService.Controllers.DiscountController.GetDiscountCode (DiscountService)' 2023-03-03 22:46:35.0011|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished in 770.9535ms 200 application/json; charset=utf-8 2023-03-03 22:50:10.4557|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/1.1 GET http://api.skilldorm.com/discount/api/Discount/GetDiscountCode?code=IC-SKD50&courseId=255 2023-03-03 22:50:10.4557|2|INFO|Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler|Successfully validated the token. 2023-03-03 22:50:10.4557|1|INFO|Microsoft.AspNetCore.Authorization.DefaultAuthorizationService|Authorization was successful. 2023-03-03 22:50:10.4557|0|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executing endpoint 'DiscountService.Controllers.DiscountController.GetDiscountCode (DiscountService)' 2023-03-03 22:50:10.4557|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). 2023-03-03 22:50:10.4557|10403|INFO|Microsoft.EntityFrameworkCore.Infrastructure|Entity Framework Core 3.1.11 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies 2023-03-03 22:50:10.4557|10403|INFO|Microsoft.EntityFrameworkCore.Infrastructure|Entity Framework Core 3.1.11 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies 2023-03-03 22:50:10.4693|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 2023-03-03 22:50:10.4693|1|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor|Executing ObjectResult, writing value of type 'CommonBase.Model.SaveResponse'. 2023-03-03 22:50:10.4693|2|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executed action DiscountService.Controllers.DiscountController.GetDiscountCode (DiscountService) in 8.7535ms 2023-03-03 22:50:10.4693|1|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executed endpoint 'DiscountService.Controllers.DiscountController.GetDiscountCode (DiscountService)' 2023-03-03 22:50:10.4693|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished in 15.7293ms 200 application/json; charset=utf-8 2023-03-03 22:50:11.3923|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 2023-03-03 22:50:11.3953|0|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executing endpoint 'DiscountService.Controllers.DiscountController.UpdateDiscountCodeUsage (DiscountService)' 2023-03-03 22:50:11.3953|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). 2023-03-03 22:50:11.3953|10403|INFO|Microsoft.EntityFrameworkCore.Infrastructure|Entity Framework Core 3.1.11 initialized 'AppDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies 2023-03-03 22:50:11.4258|20101|INFO|Microsoft.EntityFrameworkCore.Database.Command|Executed DbCommand (3ms) [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 2023-03-03 22:50:11.4677||ERROR|DiscountService.Controllers.DiscountController|Object reference not set to an instance of an object. 2023-03-03 22:50:11.4677|1|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor|Executing ObjectResult, writing value of type 'CommonBase.Model.SaveResponse'. 2023-03-03 22:50:11.4677|2|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executed action DiscountService.Controllers.DiscountController.UpdateDiscountCodeUsage (DiscountService) in 70.3755ms 2023-03-03 22:50:11.4677|1|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executed endpoint 'DiscountService.Controllers.DiscountController.UpdateDiscountCodeUsage (DiscountService)' 2023-03-03 22:50:11.4677|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished in 78.1203ms 200 application/json; charset=utf-8 2023-03-03 23:29:44.8606|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/1.1 POST http://127.0.0.1:32030/DISCOUNT/iisintegration 0 2023-03-03 23:29:44.8606|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished in 1.1215ms 202