Activities of "ademaygun"

  • ABP Framework version: v5.3.3
  • 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:

I have an abp project consisting of the addresses https://online.abc.com (angular) and https://online-api.abc.com. Additionally, I have another abp project using https://account.abc.com as an external login. In other words, when a user wants to log in, they are redirected to https://account.abc.com and log in successfully. However, when they log out, the call to https://online-api.abc.com/connect/endsession is made for logout. Despite wanting to log out from https://account.abc.com as well (meaning, calling https://account.abc.com/connect/endsession), it doesn't log out. How can I achieve this?

online.abc.com HostModule : (Enable Local Login = false)

context.Services.AddAuthentication().AddAbpOpenIdConnect("oidc", options =>
            {
                options.Authority = configuration["ExternalProvider:Authority"];
                options.RequireHttpsMetadata = Convert.ToBoolean(configuration["ExternalProvider:RequireHttpsMetadata"]); ;
                options.ResponseType = OpenIdConnectResponseType.CodeIdToken;
                options.ClientId = configuration["ExternalProvider:ClientId"];
                options.ClientSecret = configuration["ExternalProvider:ClientSecret"];
                options.UsePkce = true;
                options.SaveTokens = true;
                options.GetClaimsFromUserInfoEndpoint = true;
                options.Scope.Add("role");
                options.Scope.Add("email");
                options.Scope.Add("phone");
                options.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "sub");
            });

  • ABP Framework version: v5.3.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have an ABP project (account.abc.com), and another project (xyz.abc.com, not an ABP project) uses this project as an external login.

When we log out on xyz.abc.com, it sends post_logout_redirect_uri as a parameter, but the logout redirect is not working. I noticed that in my ABP projects, this parameter is sent as PostLogoutRedirectUri. I saw on the IDS page that it is used as post_logout_redirect_uri. We are unable to convince the team developing xyz.abc.com to make the change from post_logout_redirect_uri to PostLogoutRedirectUri.

In summary, even if post_logout_redirect_uri is sent as a parameter, how can we ensure that the logout process works?

  • ABP Framework version: v5.3.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have a Dockerfile in my Abp project (in aspnet-core folder) as shown below..

Dockerfile:

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
WORKDIR /App
RUN dotnet tool install -g Volo.Abp.Cli --version 5.3.3

# Copy everything
COPY . ./

#this line added
RUN /root/.dotnet/tools/abp install-libs

# Restore as distinct layers
RUN dotnet restore

# Build and publish a release
RUN dotnet publish -c Release -o out


# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /App
COPY --from=build-env /App/out .
ENTRYPOINT ["dotnet", "MyCompany.HttpApi.Host.dll"]

I'm encountering the error Volo.Abp.AbpException: Could not find file '/libs/abp/core/abp.css' in the application. So I added the RUN /root/.dotnet/tools/abp install-libs line because the wwwroot/libs folder is not created within the Docker container.

However, now I'm getting the error:

#11 1.284 [20:30:31 WRN] NPM is not installed, visit https://nodejs.org/en/download/ and install NPM.

What should I do?

jenkins(is a ubuntu server) console output:

+ docker build -t gcr.io/test/myCompany-api:240 -f MyCompany/aspnet-core/Dockerfile MyCompany/aspnet-core
# 1 [internal] load .dockerignore
# 1 transferring context: 358B done
# 1 DONE 0.0s

# 2 [internal] load build definition from Dockerfile
# 2 transferring dockerfile: 593B done
# 2 DONE 0.0s

# 3 [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
# 3 DONE 0.1s

# 4 [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
# 4 DONE 0.2s

# 5 [build-env 1/7] FROM mcr.microsoft.com/dotnet/sdk:6.0@sha256:6816906adc86b96630fd58c86d73e49f01c9403aeef4a5c76c2b1de4f15753ff
# 5 DONE 0.0s

# 6 [stage-2 1/3] FROM mcr.microsoft.com/dotnet/aspnet:6.0@sha256:97cb6ea106e157df9c3db7b2c50884141d0d0764d465104d7515bf409d7c99d3
# 6 DONE 0.0s

# 7 [internal] load build context
# 7 transferring context: 326.25kB 0.1s done
# 7 DONE 0.1s

# 8 [build-env 2/7] WORKDIR /App
# 8 CACHED

# 9 [build-env 3/7] RUN dotnet tool install -g Volo.Abp.Cli --version 5.3.3
# 9 CACHED

# 10 [build-env 4/7] COPY . ./
# 10 DONE 0.3s

# 11 [build-env 5/7] RUN /root/.dotnet/tools/abp install-libs
# 11 0.646 [20:30:31 INF] ABP CLI (https://abp.io)
# 11 0.844 [20:30:31 INF] Version 5.3.3 (Stable)
# 11 1.262 [20:30:31 WRN] ABP CLI has a newer stable version 7.4.2, please update to get the latest features and fixes.
# 11 1.262 [20:30:31 WRN] 
# 11 1.262 [20:30:31 WRN] Update Command: 
# 11 1.262 [20:30:31 WRN] dotnet tool update -g Volo.Abp.Cli
# 11 1.263 [20:30:31 WRN] 
# 11 1.284 [20:30:31 WRN] NPM is not installed, visit https://nodejs.org/en/download/ and install NPM
# 11 DONE 1.3s
  • ABP Framework version: v5.3.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: No exception message
  • Steps to reproduce the issue:
  1. I want only external login to be enabled and all other login methods to be disabled in my Abp project. How can I achieve this?
  2. If the external login is successful, and the user is coming to my system for the first time, I want to perform some checks and custom updates. How can I achieve this? I couldn't determine if I need to implement coding similar to the this solution provided after my research.

Note : External login provider is an another Abp project

  • 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;
    }
  • 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.

  • 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.

Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v7.1.1
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I developed a new project in Abp and ran it on our test servers. However, when I deployed it to production environments, I started encountering this error. I have checked all the URLs related to OpenIdDict, but couldn't find any issues. Why do you think I am getting this error? (I have checked the DNS, and there doesn't seem to be a problem there either)

2023-08-25 11:42:44.908 +03:00 [ERR] Connection id "0HMT58T053R06", Request id "0HMT58T053R06:00000001": An unhandled exception was thrown by the application.
System.UriFormatException: Invalid URI: The hostname could not be parsed.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
   at System.Uri..ctor(String uriString, UriKind uriKind)
   at OpenIddict.Validation.AspNetCore.OpenIddictValidationAspNetCoreHandlers.ResolveRequestUri.HandleAsync(ProcessRequestContext context)
   at OpenIddict.Validation.OpenIddictValidationDispatcher.DispatchAsync[TContext](TContext context)
   at OpenIddict.Validation.OpenIddictValidationDispatcher.DispatchAsync[TContext](TContext context)
   at OpenIddict.Validation.AspNetCore.OpenIddictValidationAspNetCoreHandler.HandleRequestAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|8_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.HandleException(HttpContext context, ExceptionDispatchInfo edi)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|8_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

  • ABP Framework version: v5.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I am debugging the code below. When I check the database after executing the CompleteAsync() command, I observe that there is no change. The change only occurs when the method is completed. Don't you think this is misleading?

public async Task UpdateAsync(string name)
        {
            List<string> myList = new() { "1", "2" };
            foreach (var id in myList)
            {
                using (var uow = unitOfWorkManager.Begin(isTransactional: true))
                {
                    var product = await productRepository.GetAsync(id);
                    product.SetName(name);
                    await productRepository.UpdateAsync(product);
                    await uow.CompleteAsync();
                }
            }
        }
Showing 11 to 20 of 36 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.1.0-preview. Updated on December 12, 2025, 10:36
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.