Activities of "ademaygun"

  • ABP Framework version: v5.3.3
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
  • A user logs in to the ABP application.
  • The admin deactivates this user.(on another browser or machine)

I want the logged-in and deactivated user to be unable to perform any actions in the application or to force log out when they click anywhere. Is there a way to achieve this?

  • ABP Framework version: v7.3.2
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: No exception
  • Steps to reproduce the issue:

As expressed by the user @mgurer , the methods of the class we implemented from IAbpClaimsPrincipalContributor are not being triggered in the refresh token flow. Therefore, we created a class derived from MyPrepareAccessTokenPrincipal. However, within the HandleAsync, how can we use our repository class?

public ValueTask HandleAsync(OpenIddictServerEvents.ProcessSignInContext context)
    {
	    var identity = context.AccessTokenPrincipal?.Identities.FirstOrDefault();
		var userId = identity?.FindUserId();
		if (userId!=null)
		{
		  var user = userRepository.GetAsync(userId); //<-- HOW CAN I INJECT userRepository
		}
		
        return default;
    }

Hello Anjali_Musmade,

Thank you for your response. It was definitely helpful to see this question. However, if possible, resolving the issue at its source is always a better solution. I'm curious about the following:

Would using ArgumentException instead of BusinessException in the Check class called within the Entity be a preference or a necessity? Because before .NET 7, we couldn't perform dependency injection into entity classes. Therefore, was it a necessity to use exceptions of type ArgumentException in entity classes due to the inability to localize them, or was it a deliberate choice?

About 10 months ago, Halil İbrahim Kalkan published an impressive article. I would like to see the adaptation of the Abp Suite's entity and manager classes in accordance with this article.

  • ABP Framework version: v7.3.2
  • UI Type: Angular
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

When I create an entity with Abp Suite, I notice that some length and not-null checks are being performed.

  1. Why is BusinessException not being thrown in checks made with the Check class, and instead ArgumentException/ArgumentNull exceptions are thrown? (I don't see any drawback to throwing a business exception in the domain layer)
  2. The relevant checks are being performed in the constructor, but the properties have accessible set accessors. There is also a gap here.

If you agree with what I've mentioned in both points, Abp Suite should generate more robust code and I expect a change in this regard.

Hi @maliming,

The code you provided worked, thank you very much for your support

  • ABP Framework version: v7.3.2
  • UI Type: Angular
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: The property or indexer 'IdentityUser.TenantId' cannot be used in this context because the set accessor is inaccessible.
  • Steps to reproduce the issue:

I want to update the tenantId of the user in the IdentityUser(AbpUser) table, but the TenantId setter is written as "protected." Is there a way for me to update the user's tenantId ?

var user = await userRepository.GetAsync(userId);
            user.TenantId = newTenantId; //compile error -> The property or indexer 'IdentityUser.TenantId' cannot be used in this context because the set accessor is inaccessible.

yes, thanks for your attention

We've identified the source of the problem. We have an Nginx server in the DMZ, and other requests are also coming to this project. In the past, another Abp project with version 5.1.4 (IdentityServer) used to handle other requests, but it didn't throw any errors.

The request causing the error: (nginx access log) X.X.X.X - - [05/Sep/2023:16:07:47 +0300] "GET /swagger HTTP/1.1" 500 177 "https://[A.B.C.D]/" "Go-http-client/1.1"

X.X.X.X is our test server, which has Grafana installed and sends these requests.

Hi Maliming, The error is still occurring.Unfortunately, we cannot share the source code. If possible, can we meet via Google Meet? Can you share your Gmail address and your available time with us

Hi Anjali_Musmade, The same error is appearing in the logs every 2 seconds on its own. We've turned off Healthcheck, so it's not the cause. We've checked all of our URLs, and there doesn't appear to be any issue. We don't experience this problem in the test environment; it only occurs in the production environment

Showing 51 to 60 of 113 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on October 21, 2026, 11:09
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.