Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "cangunaydin"

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? v11
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net 6

Hello i have few questions about shared modules. So as an intro here are the modules that is shared for admin (for admin folder) and app(for app folder).

@NgModule({
    declarations: [
        RoleComboComponent,
        PermissionTreeComponent,
        PermissionTreeModalComponent,
        PermissionComboComponent,
        OrganizationUnitsTreeComponent,
        FeatureTreeComponent,
        EditionComboComponent,
    ],
    imports: [
        AppSharedModule,
        ReactiveFormsModule,
        TreeModule,
        TooltipModule,
        FormsModule,
        CommonModule,
        UtilsModule,
        AppCommonModule,
        TableModule,
        TreeModule,
        DragDropModule,
        ContextMenuModule,
        PaginatorModule,
        AutoCompleteModule,
        EditorModule,
        InputMaskModule,
        CountoModule,
        TextMaskModule,
        ImageCropperModule,
        PerfectScrollbarModule,
        DropdownModule,
        AppBsModalModule,
        FileUploadModule,
        PrimeNgFileUploadModule,
        SubheaderModule,
    ],
    exports: [
        RoleComboComponent,
        PermissionTreeComponent,
        PermissionTreeModalComponent,
        PermissionComboComponent,
        OrganizationUnitsTreeComponent,
        FeatureTreeComponent,
        EditionComboComponent,
        UtilsModule,
        AppCommonModule,
        TableModule,
        TreeModule,
        DragDropModule,
        ContextMenuModule,
        PaginatorModule,
        AutoCompleteModule,
        EditorModule,
        InputMaskModule,
        CountoModule,
        TextMaskModule,
        ImageCropperModule,
        PerfectScrollbarModule,
        DropdownModule,
        AppBsModalModule,
        AppSharedModule,
        ReactiveFormsModule,
        TreeModule,
        TooltipModule,
        FormsModule,
        CommonModule,
        FileUploadModule,
        PrimeNgFileUploadModule,
        SubheaderModule,
    ],
})
export class AdminSharedModule {}
const imports = [
    CommonModule,
    FormsModule,
    HttpClientModule,
    HttpClientJsonpModule,
    ModalModule,
    TabsModule,
    BsDropdownModule,
    PopoverModule,
    BsDatepickerModule,
    AppCommonModule,
    FileUploadModule,
    AppRoutingModule,
    UtilsModule,
    ServiceProxyModule,
    TableModule,
    PaginatorModule,
    ProgressBarModule,
    PerfectScrollbarModule,
    TextMaskModule,
    ImageCropperModule,
    AutoCompleteModule,
    NgxSpinnerModule,
    AppBsModalModule,
];

@NgModule({
    imports: [...imports],
    exports: [...imports],
    declarations: [ThemesLayoutBaseComponent],
})
export class AppSharedModule {}
  1. First of all i really didn't understand what 'AppRoutingModule' do inside AppSharedModule?
  2. I see some modules that is exported from both modules are the same like AppCommonModule, FileUploadModule,TableModule,PaginatorModule etc. aren't 2 of the same exports are unnecessary? since all the page modules are already importing both of the modules.
  3. Since angular 9, anz use ivy compiler, what is the best way to debug the angular app? I was using augury https://augury.rangle.io/ before my anz version update. But since they don't support ivy i can not see the routing tree anymore do you have any suggestions for this? I am having problems on some of the modules that i lazy load. If you look at the picture, you can see the navigation is redirected to auditlogs but it doesn't load the auditlogs module. Chrome is becoming unresponsive. Probably sth with angular routing but since i do not get any error i couldn't figure it out, do you have any idea how to debug this?

Thank you for the assistance, looking forward for your reply.

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? v11 prerelease
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net 6

If issue related with ABP Framework

  • What is ABP Framework version? latest

Hello, I have upgraded my project to v11 from v9.3 so i can see that moment library has changed to luxon and there is datetimeservice which do the date manipulation and formatting. So while i was inspecting the code i have found sth.

 createUtcDate(year: number, month: number, day: number): DateTime {
        return DateTime.utc(year, month + 1, day);
    }

    toUtcDate(date: DateTime | Date): DateTime {
        if (date instanceof Date) {
            return this.createUtcDate(date.getFullYear(), date.getMonth(), date.getDate());
        }

        return this.createUtcDate(date.year, date.month, date.day);
    }

here is the code block from DateTimeService, I have 2 questions about this code block

  1. as you can see over here if toUtcDate gets javascript date instance, then it sends the month directly from javascript date object which starts from 0 index. Since luxon months starts from index 1, it is added +1 over there and we get the correct result. On the other hand if toUtcDate gets DateTime object i think this code will break since date.month in luxon starting from 1, which means createutcdate shouldn't add +1 to the month. I believe this is a bug, so i have changed the code to
    createUtcDate(year: number, month: number, day: number): DateTime {
        return DateTime.utc(year, month, day);
    }
  //change the timezone to utc with same values from local, keep local time values
    toUtcDate(date: DateTime | Date): DateTime {
        if (date instanceof Date) {
            return this.createUtcDate(date.getFullYear(), date.getMonth() + 1, date.getDate());
        }

        return this.createUtcDate(date.year, date.month, date.day);
    }
  1. since createUtcDate() method doesn't take times isn't it better to use sth like date.setZone("utc", { keepLocalTime: true }); i think if you are manipulating datetime objects it is better to use this version? maybe for js instances you can not do that? https://moment.github.io/luxon/#/zones?id=keeplocaltime

Looking forward for your reply, thanks again.

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? v9.3.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core

Hello, Is it possible to change the default language for specific tenants in the application. When we upgrade our project to v9.3.0 from v8.1.0 the menu option has disappeared from the action button list in languages. So when i looked into it, there is an if condition in angular html page.

 <li>
                                                        <a href="javascript:;" class="dropdown-item"
                                                            *ngIf="'Pages.Administration.Languages.Edit' | permission"
                                                            (click)="setAsDefaultLanguage(record)">{{'SetAsDefaultLanguage' | localize}}</a>
                                                    </li>

and on the server side permissions has been stated if it is a multitenant application the permission is created for the host. in AppAuthorizationProvider.cs

var languages = administration.CreateChildPermission(AppPermissions.Pages_Administration_Languages, L("Languages"));
            languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_Create, L("CreatingNewLanguage"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_Edit, L("EditingLanguage"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_Delete, L("DeletingLanguages"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_ChangeTexts, L("ChangingTexts"));

so the question is if this is by design with the new version? or is it a bug? and when i look at the application service for changing default language,

  public async Task SetDefaultLanguage(SetDefaultLanguageInput input)
        {
            await _applicationLanguageManager.SetDefaultLanguageAsync(
                AbpSession.TenantId,
               CultureHelper.GetCultureInfoByChecking(input.Name).Name
                );
        }

there is no permission restriction with abpauthorize? can you clarify this? Thank you for the assistance

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? Asp.net Zero v9.3
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core

If issue related with ABP Framework

  • What is ABP Framework version? v5.14.0

Hello support, I am trying to implement custom jwt authentication for my mobile application. I have partially done that and it works find when i add my authorization attribute to my controllers in my web.host project. What i couldn't understand is when i add the authorize attribute to web.application appservice classes it doesn't authorize the token so it is like allowanonymous method. Is it how it is designed? or do i miss sth over here.

here is what i have changed in the project. i have added below line to my AuthorConfigurer class.

if (bool.Parse(configuration["Authentication:AssociateJwtBearer:IsEnabled"]))
            {
                authenticationBuilder.AddJwtBearer("AssociateBearer", options =>
                 {
                     options.TokenValidationParameters = new TokenValidationParameters
                     {
                         // The signing key must match!
                         ValidateIssuerSigningKey = true,
                         IssuerSigningKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes(configuration["Authentication:AssociateJwtBearer:SecurityKey"])),

                         // Validate the JWT Issuer (iss) claim
                         ValidateIssuer = true,
                         ValidIssuer = configuration["Authentication:AssociateJwtBearer:Issuer"],

                         // Validate the JWT Audience (aud) claim
                         ValidateAudience = true,
                         ValidAudience = configuration["Authentication:AssociateJwtBearer:Audience"],

                         // Validate the token expiry
                         ValidateLifetime = true,

                         // If you want to allow a certain amount of clock drift, set that here
                         ClockSkew = TimeSpan.Zero
                     };

                     options.SecurityTokenValidators.Clear();
                     options.SecurityTokenValidators.Add(new BookAndAdAssociateJwtSecurityTokenHandler());

                     options.Events = new JwtBearerEvents
                     {
                         OnAuthenticationFailed = context =>
                         {
                             if (context.Exception.GetType() == typeof(SecurityTokenExpiredException))
                             {
                                 context.Response.Headers.Add("Token-Expired", "true");
                             }
                             return Task.CompletedTask;
                         }
                     };


                 });
            }

then i have created this class under ByteBrick.BookAndAd.Web.Authentication.JwtBearer

 public class AssociateTokenAuthConfiguration
    {

        public SigningCredentials AssociateSigningCredentials { get; set; }

        public SymmetricSecurityKey AssociateSecurityKey { get; set; }

        public string AssociateIssuer { get; set; }

        public string AssociateAudience { get; set; }

        public TimeSpan AssociateAccessTokenExpiration { get; set; }

        public TimeSpan AssociateRefreshTokenExpiration { get; set; }
    }

and for validation i copy and change the JwtSecurityTokenHandler

public class BookAndAdAssociateJwtSecurityTokenHandler : ISecurityTokenValidator
    {
        private readonly JwtSecurityTokenHandler _tokenHandler;

        public BookAndAdAssociateJwtSecurityTokenHandler()
        {
            _tokenHandler = new JwtSecurityTokenHandler();
        }

        public bool CanValidateToken => true;

        public int MaximumTokenSizeInBytes { get; set; } = TokenValidationParameters.DefaultMaximumTokenSizeInBytes;

        public bool CanReadToken(string securityToken)
        {
            return _tokenHandler.CanReadToken(securityToken);
        }

        public ClaimsPrincipal ValidateToken(string securityToken, TokenValidationParameters validationParameters, out SecurityToken validatedToken)
        {
            var cacheManager = IocManager.Instance.Resolve<ICacheManager>();
            var principal = _tokenHandler.ValidateToken(securityToken, validationParameters, out validatedToken);

            if (!HasAccessTokenType(principal))
            {
                throw new SecurityTokenException("invalid token type");
            }


            var tokenValidityKeyClaim = principal.Claims.First(c => c.Type == AppConsts.AssociateTokenValidityKey);
            if (TokenValidityKeyExistsInCache(tokenValidityKeyClaim, cacheManager))
            {
                return principal;
            }

            var associateIdentifier = principal.Claims.First(c => c.Type == AppConsts.AssociateIdentifier);


            if (!ValidateTokenValidityKey(tokenValidityKeyClaim, associateIdentifier))
            {
                throw new SecurityTokenException("invalid");
            }

            var tokenAuthConfiguration = IocManager.Instance.Resolve<AssociateTokenAuthConfiguration>();
            cacheManager
                .GetCache(AppConsts.AssociateTokenValidityKey)
                .Set(tokenValidityKeyClaim.Value, "", absoluteExpireTime: tokenAuthConfiguration.AssociateAccessTokenExpiration);

            return principal;
        }

        private bool ValidateTokenValidityKey(Claim tokenValidityKeyClaim, Claim associateIdentifier)
        {
            bool isValid;

            using (var unitOfWorkManager = IocManager.Instance.ResolveAsDisposable<IUnitOfWorkManager>())
            {
                using (var uow = unitOfWorkManager.Object.Begin())
                {
                    using (unitOfWorkManager.Object.Current.DisableFilter(AbpDataFilters.MayHaveTenant,AbpDataFilters.MustHaveTenant))
                    {
                        using (var associateTokenRepository = IocManager.Instance.ResolveAsDisposable<IRepository<AssociateToken,long>>())
                        {
                            var associateToken=associateTokenRepository.Object.GetAll().Where(o => o.AssociateEmail == associateIdentifier.Value && o.Name==tokenValidityKeyClaim.Value).FirstOrDefault();
                            if (associateToken!=null && DateTime.UtcNow < associateToken.ExpireDate)
                            {
                                isValid = true;
                            }
                            else
                            {
                                isValid = false;
                            }
                            

                            //isValid = AsyncHelper.RunSync(() => associateRepository(user, tokenValidityKeyClaim.Value));

                            uow.Complete();
                        }
                    }
                }
            }

            return isValid;
        }

        private static bool TokenValidityKeyExistsInCache(Claim tokenValidityKeyClaim, ICacheManager cacheManager)
        {
            var tokenValidityKeyInCache = cacheManager
                .GetCache(AppConsts.AssociateTokenValidityKey)
                .GetOrDefault(tokenValidityKeyClaim.Value);

            return tokenValidityKeyInCache != null;
        }

     

        private bool HasAccessTokenType(ClaimsPrincipal principal)
        {
            return principal.Claims.FirstOrDefault(x => x.Type == AppConsts.TokenType)?.Value ==
                   TokenType.AccessToken.To<int>().ToString();
        }

    }

then i have created an appservice only for my new mobile app. calling the methods of that service here is the code for it.

[Authorize(AuthenticationSchemes = "AssociateBearer")]
    public class MobileOfferAppService : BookAndAdAppServiceBase, IMobileOfferAppService
    {

        private readonly IRepository<Offer> _offerRepository;
        private readonly IRepository<ScreenTenantImage> _screenTenantImageRepository;
        private readonly AssociateSession _session;
        private readonly IAppFolders _appFolders;
        private readonly IOfferPdfHelper _offerPdfHelper;
        private readonly IRepository<OfferPdfFile> _offerPdfFileRepository;

        public MobileOfferAppService(
            IRepository<OfferPdfFile> offerPdfFileRepository,
            IOfferPdfHelper offerPdfHelper,
            IAppFolders appFolders,
            AssociateSession session,
            IRepository<ScreenTenantImage> screenTenantImageRepository,
            IRepository<Offer> offerRepository)
        {
            _offerPdfFileRepository = offerPdfFileRepository;
            _offerPdfHelper = offerPdfHelper;
            _appFolders = appFolders;
            _session = session;
            _screenTenantImageRepository = screenTenantImageRepository;
            _offerRepository = offerRepository;
        }


        public async Task<PagedResultDto<MobileProposalListDto>> GetOffers(GetOffersForMobileInput input)
        {

and of course i have a session object and stuff. but i won't give more details about it. When i try to call this method from postman or my mobile app. Even if i have Authorize attribute it doesn't do any authorization. But when i call it from my mvc controller it seems fine. Is there any workaround to achieve it. Maybe to customize abpauthorize method to support different schemes? Cause even if it is not authorized i can see that token is expired from the controller that i have implented. Here is the snapshot for it.

and here i catch the event when i debug.

Thank you for the assistance.

Hello i am using, Asp.net Zero v8.1.0 with Angular Abp version 5.4.0

this is most likely a general question about Abp Framework but i couldn't figure it out how to do this.

Is it possible for host users to skip the permissions when they do a backend call? Like let's say one method needs a tenant permission like 'Pages.Tenant.Dashboard' if you are a host user,then you should be able to call the method too. Since you can not give tenant permissions to a host user. Any idea about it?

Thank you for the assistance.

Hello, Here is my problem. We have updated our ANZ v7.1 to v8.1. we were using .Net Framework 4 in early version. Now we switched our project to .Net Core 3.1 and we optimized our ef queries so it won't give any runtime errors or heavy load in the server side with ef core v3.1. And it worked very well on our staging environment. Queries were pretty fast. The problem is occured when it was in production environment under load. When i say load it wasn't super heavy load. I have prepared a load test with gattling ( https://gatling.io/) and ramped up my users to 40. And when i monitor the open connections from perfmon tool. I see that there are lots of connections were open and not closed after the requests. I have also checked the sql server with this query while the web site is getting the load

select count(*) as sessions,
         s.host_name,
         s.host_process_id,
         s.program_name,
         db_name(s.database_id) as database_name
   from sys.dm_exec_sessions s
   where is_user_process = 1
   group by host_name, host_process_id, program_name, database_id
   order by count(*) desc;

sessions hit 100 and stayed like that and all the website is locked when there is a load on the website. Also i got lots of timeout expired from sql server while i am doing this procedure. You can see the error log that i was getting below.

    System.InvalidOperationException: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.
   at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at Microsoft.Data.SqlClient.SqlConnection.Open()
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnection(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel)
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.BeginTransaction(DatabaseFacade databaseFacade, IsolationLevel isolationLevel)
   at Abp.EntityFrameworkCore.Uow.DbContextEfCoreTransactionStrategy.CreateDbContext[TDbContext](String connectionString, IDbContextResolver dbContextResolver)
   at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.GetOrCreateDbContext[TDbContext](Nullable`1 multiTenancySide, String name)
   at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.get_Table()
   at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.GetQueryable()
   at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.GetAllIncluding(Expression`1[] propertySelectors)
   at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.FirstOrDefaultAsync(TPrimaryKey id)
   at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinallyAndGetResult[T](Task`1 actualReturnValue, Func`1 postAction, Action`1 finalAction)

Since i was using the framework for a long time, i know framework is running with unit of works in every request. So shouldn't the framework close the connection automatically after the request is finished. Why the connections are still open on the background and reaching max pool size. Or Maybe sth i have done on the project changed the behavior, have any ideas on this issue? Or sth that can lead me to the right path? I do not use datareader or i do not open the connection manually it was the same pattern that we are using all the time. And one more thing is we use hangfire for the background jobs. So when i query the sql for open connections it was giving two different providers. One was Core Microsoft SqlClient Data Provider and the other one was Core .Net SqlClient Data Provider. Is this the way it should be? Thank you for the assistance

Hello, I have a problem while refresh token is requested. This is happening in mobile but i believe it is independent from mobile app. Basically the problem is in the backend. If the user is logged in, data storage of the mobile app is asking directly to get the configuration from the server. Then the request is coming to

 public ClaimsPrincipal ValidateToken(string securityToken, TokenValidationParameters validationParameters, out SecurityToken validatedToken)
 

here principal is generated. So there is no problem over here. It has useridentifier key in the claims. And if you look at the settingManager.abpSession it has tenantId. you can see it in the snapshot.

everything works fine until now. Then when it tries to call ValidateSecurityStampAsync() it says that There is no user with the id 3. Cause it is trying to validate the principal in ValidateSecurityStampAsync()

 if (!await securityStampHandler.Object.Validate(principal))

and when it tries to parse the identifier it gets the tenantid as null. you can look at the snapshot.

and afterwards it tries to call ValidateSecurityStampFromDb() in JwtSecurityStampHandler Class here is the method.

private async Task<bool> ValidateSecurityStampFromDb(UserIdentifier userIdentifier, string securityStamp)
        {
            using (var uow = _unitOfWorkManager.Begin())
            {
                using (_unitOfWorkManager.Current.SetTenantId(userIdentifier.TenantId))
                {
                    var user = _userManager.GetUser(userIdentifier);
                    uow.Complete();

                    //cache last requested value
                    await SetSecurityStampCacheItem(userIdentifier.TenantId, userIdentifier.UserId, user.SecurityStamp);

                    return await _signInManager.ValidateSecurityStampAsync(user, securityStamp);
                }
            }
        }

Now when the tenantid is null it won't find the user for sure. Cause the user is related to Tenant Id=2 not to null. I think this is a kind of bug or somehow i am missing sth. that should be done before UserIdentifier.parse() method. Can you help me out pls?

Hello, When i try to download user collected data. It is giving the error. Abp.AbpException: 'Session.UserId is null! Probably, user is not logged in.'

this is in ChatMessageListExcelExporter class. When it is working as a background job.

        public FileDto ExportToFile(List<ChatMessageExportDto> messages)
        {
            var tenancyName = messages.Count > 0 ? messages.First().TargetTenantName : L("Anonymous");
            var userName = messages.Count > 0 ? messages.First().TargetUserName : L("Anonymous");

            return CreateExcelPackage(
                $"Chat_{tenancyName}_{userName}.xlsx",
                excelPackage =>
                {
                    var sheet = excelPackage.Workbook.Worksheets.Add(L("Messages"));
                    sheet.OutLineApplyStyle = true;

                    AddHeader(
                        sheet,
                        L("ChatMessage_From"),
                        L("ChatMessage_To"),
                        L("Message"),
                        L("ReadState"),
                        L("CreationTime")
                    );

                    AddObjects(
                        sheet, 2, messages,
                        _ => _.Side == ChatSide.Receiver ? (_.TargetTenantName + "/" + _.TargetUserName) : L("You"),
                        _ => _.Side == ChatSide.Receiver ? L("You") : (_.TargetTenantName + "/" + _.TargetUserName),
                        _ => _.Message,
                        _ => _.Side == ChatSide.Receiver ? _.ReadState : _.ReceiverReadState,
                        _ => _timeZoneConverter.Convert(_.CreationTime, _abpSession.TenantId, _abpSession.GetUserId())
                    );

                    //Formatting cells
                    var timeColumn = sheet.Column(5);
                    timeColumn.Style.Numberformat.Format = "yyyy-mm-dd hh:mm:ss";
                });
        }

here is used _abpSession which is null on the background thread. I have this issue when i have a chat history. When i try to download collected data for the user.

any suggestions?

Hello after i have upgraded my project to asp.net zero v8.1, (my old version was v7.1 with .Net Framework v4.6.1, now i have switched to .net core) I am having issues with ef core. When i try to get data from db ef core is throwing an exception

Microsoft.Data.SqlClient.SqlException HResult=0x80131904 Message=An expression of non-boolean type specified in a context where a condition is expected, near 'THEN'. Source=Core Microsoft SqlClient Data Provider

here is my code. This code is running on the hangfire background thread.

public class WrikeTaskManager : DomainService, IWrikeTaskManager
    {
        private readonly IUnitOfWorkManager _unitOfWorkManager;
        private readonly IRepository<TaskManager> _taskManagerRepository;
        public WrikeTaskManager(IUnitOfWorkManager unitOfWorkManager, IRepository<TaskManager> taskManagerRepository)
        {
            _unitOfWorkManager = unitOfWorkManager;
            _taskManagerRepository = taskManagerRepository;
        }
        [UnitOfWork]
        public void RefreshWebHookForAllTenants()
        {
            using (CurrentUnitOfWork.DisableFilter(AbpDataFilters.MayHaveTenant, AbpDataFilters.MustHaveTenant))
            {
                var allTaskManagers = _taskManagerRepository.GetAll().ToList();

                foreach (var taskManager in allTaskManagers)
                {
                    var wrikeTaskManagerClient = new WrikeTaskManagerClient(taskManager);
                    wrikeTaskManagerClient.ActivateWebhookIfSuspended().Wait();
                }
            }
        }
    }
the code is throwing exception here
var allTaskManagers = _taskManagerRepository.GetAll().ToList();

and when i run sql profiler it runs the query in the background like this.

exec sp_executesql N'SELECT [b].[Id], [b].[AccountId], [b].[AccountName], [b].[AssignedToContentManagerStatusId], [b].[BearerToken], [b].[BookAndAdDownloadedStatusId], [b].[CallCountCustomFieldId], [b].[ClientApprovedContentCustomFieldId], [b].[ClientSentContentCustomFieldId], [b].[CollectionCompletedStatusId], [b].[CompanyNameCustomFieldId], [b].[CompletedStatusId], [b].[ContentConnectedToScreenCustomFieldId], [b].[ContentCreationInProgressStatusId], [b].[ContentSentToClientCustomFieldId], [b].[CreationTime], [b].[CreatorUserId], [b].[DeleterUserId], [b].[DeletionTime], [b].[DescriptionCustomFieldId], [b].[FolderId], [b].[IsDeleted], [b].[IsDeliveredCustomFieldId], [b].[LastCalledCustomFieldId], [b].[LastModificationTime], [b].[LastModifierUserId], [b].[LastTaskAssignedContentManagerId], [b].[MediaLengthCustomFieldId], [b].[MediaTypeCustomFieldId], [b].[NewStatusId], [b].[OfferEndDateCustomFieldId], [b].[OfferIdCustomFieldId], [b].[OfferItemDateIdCustomFieldId], [b].[OfferNameCustomFieldId], [b].[OfferStartDateCustomFieldId], [b].[OfferStatus], [b].[ProductionIdCustomFieldId], [b].[ProductionNameCustomFieldId], [b].[RootFolderId], [b].[TenantId], [b].[Type], [b].[WebHookId]
FROM [bbTaskManagers] AS [b]
WHERE (CASE
    WHEN CAST(0 AS bit) THEN CAST(1 AS bit)
    ELSE CAST(0 AS bit)
END = @__ef_filter__IsMustHaveTenantFilterEnabled_1) AND (([b].[IsDeleted] <> CAST(1 AS bit)) OR ([b].[IsDeleted] <> @__ef_filter__IsSoftDeleteFilterEnabled_2))',N'@__ef_filter__IsMustHaveTenantFilterEnabled_1 bit,@__ef_filter__IsSoftDeleteFilterEnabled_2 bit',@__ef_filter__IsMustHaveTenantFilterEnabled_1=0,@__ef_filter__IsSoftDeleteFilterEnabled_2=1

which does not run and throwing the same error. So i wonder why the ef core is translating it wrong to sql. Did i do sth wrong while i am upgrading? Is that some kind of reference issue? Any help would be appreciated.Thank you.

Hello AspnetZero Team, I am using Asp.Net Zero v6.4 Angular App. I have a problem with dates for my application. Cause of the problem is, in some pages i need to get the date from the user as utc and reflect back to that page as utc value (as it is in database). My application use timezones. So every user can choose different timezones.

As i see it in Asp.net Zero, all the date (momentjs) values are converted to utc before it goes the server side and when you get the values from the server it is converted to timezone of the user has chosen and reflected to ui. I was wondering if there is any solution or function in abp framework to disable it in certain pages so all the date values can go to the database, only for that page as utc values, instead of converting them. Cause i have an application that the users needs to set certain values as utc.

How should i approach the problem and what should be the best way to solve it in aspnetzero application? Thanks for your assistance.

Showing 11 to 20 of 50 entries