Activities of "sumeyye.kurtulus"

Hello again, I am refunding your ticket. Thank you for your cooperation.

Answer

Hello,

You can use component replacement to achieve these points. You can find a reference in the documentation. I can also provide a sample implementation for the keys that you have been looking for:

import { AuthService, ReplaceableComponentsService } from '@abp/ng.core';
import { Component, inject } from '@angular/core';
import { eThemeLeptonXComponents } from '@volosoft/abp.ng.theme.lepton-x';
import { YourNewFooterComponent } from './your-new-footer/your-new-footer.component';
import { YourNewToolbarComponent } from './your-new-toolbar/your-new-toolbar.component';
import { YourNewSettingsComponent } from './your-new-settings/your-new-settings.component';

@Component({
  selector: 'app-root',
  template: `
    ...
  `,
})
export class AppComponent {
  private replaceableComponents = inject(ReplaceableComponentsService);
  private authService = inject(AuthService);
  constructor() {
    this.replaceableComponents.add({
      component: YourNewFooterComponent,
      key: eThemeLeptonXComponents.Footer,
    });

    if (!this.authService.isAuthenticated) {
      this.replaceableComponents.add({
        component: YourNewToolbarComponent,
        key: eThemeLeptonXComponents.Toolbar,
      });
      this.replaceableComponents.add({
        component: YourNewSettingsComponent,
        key: eThemeLeptonXComponents.Settings,
      });
    }
  }
}

You can let us know if you need further assistance.

Thank you for your patience and for providing more details on your scenario — let’s wrap this up!

The antiforgery token mismatch issue you’re experiencing after logging out and trying to log back in from multiple tabs is expected behavior, tied to how browsers and the OpenID Connect flow handle session and cookie isolation.

Here’s why it happens:

  • Logout invalidates the session: When you log out, the session and associated tokens (including the antiforgery token) are cleared.
  • Tabs operate independently: Each tab maintains its own isolated cookie storage. After logging out, tokens in one tab may not align with tokens in another tab, causing the mismatch when trying to log back in simultaneously.
  • Antiforgery tokens must match: The server expects the antiforgery token in the request to match the one in the cookie. If they differ (as they would across tabs after logout), the server rejects the request for security reasons.

Unfortunately, this behavior is inherent to browser security and not something ABP itself controls. You can also refer this documentation as my colleague mentioned before: https://learn.microsoft.com/en-us/aspnet/core/security/anti-request-forgery?view=aspnetcore-8.0#multiple-browser-tabs-and-the-synchronizer-token-pattern

I hope this clarifies the situation and provides some insight into why this behavior occurs.

Hello, as far as I have understood you will need to use ActionResult in the controller in some way.

To resolve this problem, you can consider using a structured base class like ActionResultBase. This ensures a consistent response format while maintaining compatibility with ABP’s proxy generation. Here’s an example implementation:

using Ticket8857.Controllers;
using System.Threading.Tasks;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;

public class ActionResultBase
{
    public bool Success { get; set; }
    public string ErrorMessage { get; set; }
    public List<string> ValidationErrors { get; set; }

    public ActionResultBase()
    {
        ValidationErrors = new List<string>();
    }
}

public class ActionResult<TValue> : ActionResultBase
{
    public ActionResultBase Result { get; set; }
    public TValue Value { get; set; }

    public ActionResult(ActionResultBase result, TValue value)
    {
        Result = result;
        Value = value;
    }
}

namespace Ticket8857.HttpApi.Controllers
{
    public class MyCustomController : Ticket8857Controller
    {
        [HttpGet("get-something")]
        public async Task<ActionResult<PagedResultDto<string>>> GetSomethingAsync()
        {
            var result = new PagedResultDto<string>(
                totalCount: 1,
                items: new List<string> { "Success" }
            );

            return new ActionResult<PagedResultDto<string>>(new ActionResultBase(), result);
        }
        
    }
}

If you think that this does not cover your case, I can assist you further.

Hello, thank you for providing the detailed information regarding your issue, and apologies for the delayed response.

It seems that the response is true for showing the error. However, I could not produce the same problem on my end since the request body might differ. That would be the best if you could provide a sample for the endpoint you have added to your project.

Meanwhile, you can also check this documentation to handle the http errors in a customized way https://abp.io/docs/latest/framework/ui/angular/http-error-handling#how-to-add-new-handler-service

Please feel free to reach out if you need additional assistance. Thank you again for your cooperation.

I am glad to hear that your problem has been resolved.

Thank you for confirmation. You can reach when you need further assistance.

I have sent you the email, but i don't think sth would come up from there. Probably it would work fine since it works on my macbook.

Thank you for sharing more details. As you have already mentioned, it should be working fine within this response. It is strange that it does not work on your windows machine, but in mac.

Apart from that, there are several ways to integrate the schematics source code to your project. My shortest recommendation is to clone the abp framework codebase

  1. You need to operate on schematics package that is under npm/ng-packs/packages/schematics directory.
  2. You can go through the package however you wish, but you should focus on https://github.com/abpframework/abp/blob/26fb5dcdcd4ceaf9412aebb7d9fbfb0bd6b9cc10/npm/ng-packs/packages/schematics/src/utils/source.ts#L43
  3. You can make changes without committing for sure
  4. In order to see the changes, you need to run yarn build:schematics command under ng-packs directory.
  5. Then you need to run yarn link under npm/ng-packs/dist/packages/schematics
  6. Copy the link command and paste under the directory you will generate the proxy

You can let us know if you need further assistance.

Hello, we are sorry for replying this late. Even if I cannot see your example, I am assuming that you want to add ids to the pages dynamically.

Here is my suggestion for managing this using a service.

// dynamic-id.service.ts
import { inject, Injectable } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router';
import { Renderer2, RendererFactory2 } from '@angular/core';

@Injectable({
  providedIn: 'root',
})
export class DynamicIdService {
  private renderer = inject(Renderer2);
  private router = inject(Router);
  private rendererFactory = inject(RendererFactory2);

  constructor() {
    this.renderer = this.rendererFactory.createRenderer(null, null);
  }

  initialize() {
    this.router.events.subscribe(event => {
      if (event instanceof NavigationEnd) {
        this.assignIdToPage();
      }
    });
  }

  private assignIdToPage() {
    setTimeout(() => {
      const outlet = document.querySelector('router-outlet');
      if (outlet) {
        const pageElement = outlet.parentElement?.lastElementChild;
        if (pageElement && !pageElement.hasAttribute('id')) {
          const path = this.router.url.split('?')[0].replace(/\//g, '-').substring(1);
          const pageId = `page-${path || 'home'}`;
          this.renderer.setAttribute(pageElement, 'id', pageId);
        }
      }
    });
  }
}

Then you can initialize this in your app component

// app.component.ts
import { Component, inject } from '@angular/core';
import { DynamicIdService } from './unique-id/dynamic-id.service';

@Component({
  selector: 'app-root',
  template: `
    &lt;abp-loader-bar&gt;&lt;/abp-loader-bar&gt;
    &lt;abp-dynamic-layout&gt;&lt;/abp-dynamic-layout&gt;
    &lt;abp-gdpr-cookie-consent&gt;&lt;/abp-gdpr-cookie-consent&gt;
  `,
})
export class AppComponent {
  private dynamicIdService = inject(DynamicIdService);
  constructor() {
    this.dynamicIdService.initialize();
  }
}

Let us know your constraints, and we will be happy to refine the solution further.

I say that for some of my microservice modules it works. But for my main app it does not.

Thank you for providing more details. That would be the best if you can also share the api-definition request result with me through this email sumeyye.kurtulus@volosoft.com.

i already know that i can uninstall with dotnet uninstall command. But aren't you caching anything in some folder (maybe in an .abp folder some files related with logging)? At least it is clear that you are saving log in information somewhere cause when i uninstall and reinstall it it doesn't ask me about it.

You can run abp cli clear-cache command apart from doing uninstall/install operations.

Showing 231 to 240 of 426 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 16, 2025, 10:35