Activities of "imranStem"

I have implemented the custom http error handler as below and registered in app module class.

export function handleHttpErrors(injector: Injector, httpError: HttpErrorResponse) {
  const toaster = injector.get(ToasterService);
  if (httpError.status === 403 || httpError.status === 400) {
    toaster.error(httpError.error?.error?.message || 'Error');
    return;
  }
  return throwError(httpError);
}
 providers: [{ provide: HTTP_ERROR_HANDLER, useValue: handleHttpErrors },.............]

The toaster message is displaying but dialog is also appearing.

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

I have azure service handler and I am creating the entity through AppService but I am getting the unauthorize permission issue.

[UnitOfWork]
        public async Task HandleEventAsync(ArticleDownCreationEto articleDownCreationEto)
        {
        await _articleDownsAppService.CreateAsync(articleDownCreationEto);
        }

I am getting below exception:

[integration-service_8e3ac652-7]: [15:59:52 INF] Authorization failed. These requirements were not met: [integration-service_8e3ac652-7]: PermissionRequirement: IntegrationService.ArticleDowns

  • ABP Framework version: v7.4.4
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: [integration-service_8e3ac652-7]: [15:59:52 INF] Authorization failed. These requirements were not met: [integration-service_8e3ac652-7]: PermissionRequirement: IntegrationService.ArticleDowns
  • Steps to reproduce the issue:

I have a Microservice architecture and all microservices has the azure service bus configuration.

I am publishing the event from Microservice 1 and receiving in Microservice 2 and again publishing the event from Microservice 2 and receiving in Microservice 3.

But When I publish the event from Microservice 1, its not aways receiving in Microservice 2. Sometimes its receiving and publishing to Microservice 3.

I have also checked the Service Bus in azure portal and there is no active message once I publish the event from Microservice 1 means the event is subscribe by other subscription but not by Microservice 2. I have written receiving handler in Microservice 2 so only Microservice 2 should subscribe the event from Microservice 1.

Is there any way to specify the subscription name while publishing the data so only that subscriber can receive the event?

Shared ETOs

Publish event from Microservice 1

Receiving handler and publishing event in Microservice 2

Receiving handler in Microservice 3

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

I want to implement the concurrent user login and I checked many articles and found that to update the SecurityStamp to invalidate the previous login. So I want to update the security token when user login into the system

I have written below code and override the token controller.

 [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(TokenController))]
    public class MyTokenController : TokenController
    {
        protected override async Task<IActionResult> SetSuccessResultAsync(OpenIddictRequest request, IdentityUser user)
        {
            var userManager = LazyServiceProvider.LazyGetRequiredService<IdentityUserManager>();
          await userManager.UpdateSecurityStampAsync(user);
            

            return await base.SetSuccessResultAsync(request, user);
        }
    }

Its updating the securityStamp on each login but token is not invalidated for previous same user login.

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

I need to call some api when user log in into the system, the page is not refreshing so app initializer will not trigger. Is there any event to trigger when user gets login into the system?

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

I am using the microservice template with the LeptonX. I want to extend the toolbar items as per screenshots.

If I used the replaceableComponents feature then I am losing the user account login/profile feature. I want to extend the toolbar items without replacing the component.

Any documentations or sample would be enough.

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

I have configured the abp microservice on the Azure Kubernetes. When I open the angular project, I am getting the below error in console.

The OpenId configuration

Authserver logs

Authserver OpenId configuration

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

I have integrated the singalr in administration microservice.

private hubConnection: signalR.HubConnection
  public startConnection = () => {
    this.hubConnection = new signalR.HubConnectionBuilder()
                            .withUrl('https://localhost:44367/signalr-hubs/change-detection')
                            .build();

                            console.log(this.hubConnection, 'hub connection');
    this.hubConnection
      .start() 
      .then(() => console.log('Connection started'))
      .catch(err => console.log('Error while starting connection: ' + err));

      this.hubConnection.on('BroadcastMessage', (data) => {
        console.log(data);
      });
  }

  constructor(){
    this.startConnection();
  }

I have put the above code in the appcomponent.ts file. The above code is working fine and when I send the signal from the administration microservice, I receive the message on "BroadcastMessage". I have used the administration service URL "https://localhost:44367".

Now I don't want to use the administration service URL, I want to use the gateway URL https://localhost:44325 so I configured the ocelot.json file as below.

 {
      "ServiceKey": "Administration Service",
      "DownstreamPathTemplate": "/signalr-hubs/{everything}",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 44367
        }
      ],
      "UpstreamPathTemplate": "/signalr-hubs/{everything}",
      "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
    },
     {
      "DownstreamPathTemplate": "/ws",
      "UpstreamPathTemplate": "/",
      "DownstreamScheme": "ws",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 44367
        }
      ]
    }

When I use the above code, I am getting the below error in console.

[2023-01-17T11:47:29.510Z] Information: WebSocket connected to wss://localhost:44325/signalr-hubs/change-detection?id=Oiwz6joKZs_dxyeYKdUsHg.
Utils.js:141 [2023-01-17T11:47:29.513Z] Error: Connection disconnected with error 'Error: Server returned handshake error: Handshake was canceled.'.
log @ Utils.js:141
_stopConnection @ HttpConnection.js:396
transport.onclose @ HttpConnection.js:334
_close @ WebSocketTransport.js:144
webSocket.onmessage @ WebSocketTransport.js:84
wrapFn @ zone.js:766
invokeTask @ zone.js:406
onInvokeTask @ core.mjs:26218
invokeTask @ zone.js:405
runTask @ zone.js:178
invokeTask @ zone.js:487
invokeTask @ zone.js:1661
globalCallback @ zone.js:1692
globalZoneAwareCallback @ zone.js:1725
Show 14 more frames
app.component.ts:22 Error while starting connection: Error: Server returned handshake error: Handshake was canceled.

If I integrated the singalr into the web gateway then I am getting the ocelot configuration not found error.

This is the administration service log

[administration-service_786370b9-c]: [17:17:09 INF] Request starting HTTP/1.1 POST https://localhost:44367/signalr-hubs/change-detection/negotiate?negotiateVersion=1 - 0
[administration-service_786370b9-c]: [17:17:09 INF] CORS policy execution successful.
[administration-service_786370b9-c]: [17:17:09 INF] Executing endpoint '/signalr-hubs/change-detection/negotiate'
[administration-service_786370b9-c]: [17:17:09 INF] Executed endpoint '/signalr-hubs/change-detection/negotiate'
[administration-service_786370b9-c]: [17:17:09 INF] Request finished HTTP/1.1 POST https://localhost:44367/signalr-hubs/change-detection/negotiate?negotiateVersion=1 - 0 - 200 316 application/json 1.8707ms
[administration-service_786370b9-c]: [17:17:09 INF] Request starting HTTP/1.1 GET https://localhost:44367/signalr-hubs/change-detection?id=Oiwz6joKZs_dxyeYKdUsHg - 0
[administration-service_786370b9-c]: [17:17:09 INF] CORS policy execution successful.
[administration-service_786370b9-c]: [17:17:09 INF] Executing endpoint '/signalr-hubs/change-detection'
[administration-service_786370b9-c]: [17:17:29 INF] Executed endpoint '/signalr-hubs/change-detection'
[administration-service_786370b9-c]: [17:17:29 INF] Request finished HTTP/1.1 GET https://localhost:44367/signalr-hubs/change-detection?id=Oiwz6joKZs_dxyeYKdUsHg - 0 - 101 - - 20029.8655ms

This is the web gateway log:

[web-gateway_8b434f23-f]: [17:17:29 DBG] requestId: 0HMNOG1S5794U:00000002, previousRequestId: no previous request id, message: ocelot pipeline finished
[web-gateway_8b434f23-f]: [17:17:29 INF] Request finished HTTP/1.1 GET https://localhost:44325/signalr-hubs/change-detection?id=Oiwz6joKZs_dxyeYKdUsHg - - - 101 42 - 20035.4048ms
  • ABP Framework version: v6.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I am getting below error when build the project from Azure pipeline.

error NU1101: Unable to find package Volo.Abp.Account.Pro.Public.Web.OpenIddict. No packages exist with this id in source(s): ABP Commercial NuGet Source, nuget.org [/src/ChurchPharmacy.sln]
error NU1101: Unable to find package Volo.Abp.Account.Pro.Public.HttpApi. No packages exist with this id in source(s): ABP Commercial NuGet Source, nuget.org [/src/ChurchPharmacy.sln]
error NU1101: Unable to find package Volo.Abp.Account.Pro.Public.Application. No packages exist with this id in source(s): ABP Commercial NuGet Source, nuget.org [/src/ChurchPharmacy.sln]
error NU1101: Unable to find package Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX. No packages exist with this id in source(s): ABP Commercial NuGet Source, nuget.org [/src/ChurchPharmacy.sln]
  Failed to restore /src/apps/auth-server/src/ChurchPharmacy.AuthServer/ChurchPharmacy.AuthServer.csproj (in 27.05 sec).

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

I want to integrate the concurrent login feature. I downloaded the sample code from GitHub. I have a microservice template. What is the best practice to integrate the concurrent login feature, with Auth Server or Identity service or any other way?

  • ABP Framework version: v6.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
Showing 11 to 20 of 47 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13