diff --git a/0_Framework/InfraStructure/NullFaceEmbeddingNotificationService.cs b/0_Framework/InfraStructure/NullFaceEmbeddingNotificationService.cs index c760d2cd..5ce50b51 100644 --- a/0_Framework/InfraStructure/NullFaceEmbeddingNotificationService.cs +++ b/0_Framework/InfraStructure/NullFaceEmbeddingNotificationService.cs @@ -27,4 +27,3 @@ public class NullFaceEmbeddingNotificationService : IFaceEmbeddingNotificationSe return Task.CompletedTask; } } - diff --git a/AccountManagement.Application/RoleApplication.cs b/AccountManagement.Application/RoleApplication.cs index 1342ac16..c2714f36 100644 --- a/AccountManagement.Application/RoleApplication.cs +++ b/AccountManagement.Application/RoleApplication.cs @@ -58,7 +58,7 @@ public class RoleApplication : IRoleApplication { _unitOfWork.RollbackAccountContext(); - return operation.Failed("ارتباط با اپلیکیش پروگرام منیجر برقرار نشد"+response.Result.errorMessage +response.Result.ErrorType + response.Error); + return operation.Failed("ارتباط با اپلیکیش پروگرام منیجر برقرار نشد"+ response.Error); } if (!response.Result.isSuccess) diff --git a/ServiceHost/Program.cs b/ServiceHost/Program.cs index f6f0b770..ee11c8e8 100644 --- a/ServiceHost/Program.cs +++ b/ServiceHost/Program.cs @@ -331,15 +331,16 @@ builder.Services.AddParbad().ConfigureGateways(gateways => storage.UseMemoryCache(); }); -#region GetHttpContext - -var httpContextAccessor = new HttpContextAccessor(); -builder.Services.AddSingleton(httpContextAccessor); - -#endregion var app = builder.Build(); + +#region GetHttpContext + +var httpContextAccessor = app.Services.GetRequiredService(); + + +#endregion app.UseCors("AllowSpecificOrigins"); #region InternalProgarmManagerApi