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

Activities of "razkhan78"

This problem has resolved. No response from your side since last 5 days so I tried with identityServer4 but using identityServer4 another issue came (upon login keeps redirecting back to login page and doesn't go to next page (HomeController -> Index page)). The ticket is open for this issue (https://support.aspnetzero.com/QA/Questions/11996/ASPNET-Zero-Upgrade-from-620-to-1311) please provide a solution for identityServer4 .

So switching to identityServer4 and then come back to OpenIdDict, now value is coming in ImpersonatorUserId.

we tried to stay at EF Core 2.1 without downgrade ABP packages (we cannot downgrade ABP packages because we are upgrading) but another exception comes as I have mentioned above in solution tried section and project doesn't run.

Is there any other solution other than fix queries?

Hi

I checked the logs but no error found. I think the problem is with Authorization. When I remove [AbpMvcAuthorize] from controller it goes to HomeController.

Hi @ismcagdas

We have tried with IdentityServer4 by installing latest version of IdentityServer4 and commented all OpenIdDict related code. The problem is upon login keeps redirecting back to login page and doesn't go to next page (HomeController -> Index page). Tried with clear caches, cookies etc. but no success. Receiving suscceed response from SignInManager but keeps redirecting back to login page.

Installing Packages:

LoadStop.Core Project: Abp.ZeroCore.IdentityServer4.EntityFrameworkCore Version="9.2.2"

LoadStop.Web.Core Project: Abp.ZeroCore.IdentityServer4 Version="8.4.0" IdentityServer4.AccessTokenValidation Version="3.0.1"

Hi Team, please respond.

Here is nuget packages(with versions) at *.EntityFrameworkCore project.

Hi Team,

We are upgrading our existing application (Asp.net Core MVC + Jquery with framework .net2.1 and version 6.2.1.) to .net 8 and version 13.1.1. following documentation (Version-Updating).

We have successfully build and run project after resolving conflicts. Now problem is that ABP latest version 9.2.2 is using EF Core 8 and our Linq queries which was working fine before upgrade (EF Core 2.1.4). Now below exception is occuring due to Entity Framework Core 3.x and later versions introduced stricter rules for translating LINQ queries to SQL.

Database: Azure SQL Database and Compatibility Level is 140

Example of Linq Query:

var recurrenceLst = _activityRepository.GetAllIncluding(x => x.CustomerFk, x => x.ContactFk) .Where(x => x.StatusId != (int)Status.Completed && x.IsRecurring && ((x.RecurrenceType == RecurrenceType.Monthly && (x.RecurrenceMonthDay == DateTime.Today.Day || (x.RecurrenceMonthDay > lastDayOfMonth && DateTime.Today.Day == lastDayOfMonth))) || (x.RecurrenceType == RecurrenceType.Weekly && x.RecurrenceWeekDay == (WeekDay)((int)DateTime.Today.DayOfWeek + 1)))).ToList();

Exception: The LINQ expression 'DbSet<Activity>() .Where(a => __ef_filter__p_0 || (int?)((IMustHaveTenant)a).TenantId == __ef_filter__CurrentTenantId_1) .Where(a => a.StatusId != 2 && a.IsRecurring && (int?)a.RecurrenceType == (int?)Monthly && a.RecurrenceMonthDay == (int?)DateTime.Today.Day || a.RecurrenceMonthDay > __lastDayOfMonth_0 && DateTime.Today.Day == __lastDayOfMonth_1 || (int?)a.RecurrenceType == (int?)Weekly && (int?)a.RecurrenceWeekDay == (int?)(WeekDay)((int)DateTime.Today.DayOfWeek + 1))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.

Solution Tried: We have thousands of Linq queries in a project and to avoid rewrite query and to load a lot of data in Memory and then filter, we tried to keep previous version of EFCore (2.1.4) and all related packages of EF Core to (2.1.4) But no success, project doesn't run and get another exception in LoadStopDbContextConfigurer file at builder.UseSqlServer(connectionString);

Exception System.TypeLoadException: 'Method 'get_Info' in type 'Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension' from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=2.1.4.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.'

Please give a solution or suggestion. Right now its not possible to rewrite thousands of Linq Queries according to EF Core 8. What we can do to support current written Linq queries?

I have tried with disable OpenIddict but still issue persists. After debug get to know PrincipalAccessor in ClaimsAbpSession getting all claims except ImpersonatorUserId claim in PrincipalAccessor.

Yes token are generating successfully and found in cache as well. We are using OpenIdDict.

Development time. As we are upgrading

Showing 1 to 10 of 112 entries