Activities of "GregB"

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ 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.

  • ABP Framework version: v3.2.1
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): Tiered
  • Exception message and stack trace: N/A
  • Steps to reproduce the issue:

How can I add a custom theme to an ABP app using Angular UI?

Hi @arnanozak.

No, I'd like to integrate another theme. The specific theme is not really important, it might be a custom theme or something bought from Theme Forrest (or similar). How do I include CSS and JS for another theme and how to I alter the HTML structure of the various components as needed by the theme.

Another way of thinking about it is how do I build an alternative to the Lepton theme?

Thanks

(I've removed my last response as it was incorrect).

I think this information answers my question for now.

Thanks @armanozak

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ 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.

  • ABP Framework version: v3.3.0
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): no
  • Exception message and stack trace: N/A
  • Steps to reproduce the issue: N/A

The documenation makes reference to DDD and describes the use of Entities and Aggregate Roots but I can't see an example of the right* way to implement this.

When you generate an Entity (FullyAuditedEntity) with ABP Suite it generates an AppService, Repository, UI and all the other bits for that entity. My understanding (which is far from complete admittedly).

Let's take an example of a simple order form or invoice (not ecommerce). The user creates a new Invoice (Aggregate Root) and adds LineItems to it. This is pretty much the canoncial example of an Aggreagate Root (, right?) and we're told the Invoice should be bring with it the line items, and then you add new items to that Aggregate Root, and then persist the Aggregate Root and it's line items as a whole.

How does this map to the patterns in ABP? Should we use standard EF functionality to Include() the line items, map those to LineItemDtos and put a IList<LineItemDto> on the Invoice aggregate root? Or should we use the service and repository provided when we create the entity?

Thinking specifically about the Angular UI, should we be loading the line items in a separate AJAX call or do they come from the Invoice service?

As a new ABP customer I feel this information is missing from the documentation and that an explanation of this canonical DDD example would be a great addition to the platform.

Thanks, Greg

  • according to the patterns and best practices of the ABP framework

I'm facing the same issue. I've just deployed my project to a staging server for my client to look at and I'm getting an Invalid Redirect URI error, but I can't see how or where I'm supposed to set it. The URL in the log is http, but all my settings are HTTPS so I don't know where it's coming from.

Is there any documentation about deploying to a live environment and what changes you're supposed to make?

Cheers, Greg

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ 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.

  • ABP Framework version: v3.3.0
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): no
  • Exception message and stack trace:

500 Internal Server Error UNAUTHORIZED_CLIENT

2020-11-02 11:04:48.240 +00:00 [ERR] Invalid redirect_uri: https://dev-web.example.com/ {"ClientId":"Example_App","ClientName":"Example_App","RedirectUri":null,"AllowedRedirectUris":["https://dev-api.example.com","https://dev-web.example.com"],"SubjectId":"anonymous","ResponseType":null,"ResponseMode":null,"GrantType":null,"RequestedScopes":"","State":null,"UiLocales":null,"Nonce":null,"AuthenticationContextReferenceClasses":null,"DisplayMode":null,"PromptMode":null,"MaxAge":null,"LoginHint":null,"SessionId":null,"Raw":{"response_type":"code","client_id":"Example_App","state":"MldHMGt1TnZkS0ItcnBXQzU1WGROck9LTWp5MGlzdFJEdjV0UE9sMS5DUjdD","redirect_uri":"https://dev-web.example.com/","scope":"openid offline_access Example","code_challenge":"vXXK9P8NZ7zMPbzktJetY4amyp5F1sqWU-rYTpQPJ3c","code_challenge_method":"S256","nonce":"MldHMGt1TnZkS0ItcnBXQzU1WGROck9LTWp5MGlzdFJEdjV0UE9sMS5DUjdD"},"$type":"AuthorizeRequestValidationLog"}

  • Steps to reproduce the issue:
  1. I've added a "development" environment to the Angular project, changing the values like so
import { Config } from '@abp/ng.core';

const baseUrl = 'https://dev-web.example.com/';

export const environment = {
  production: true,
  application: {
    baseUrl,
    name: 'Example',
  },
  oAuthConfig: {
    issuer: 'https://dev-api.example.com',
    redirectUri: baseUrl,
    clientId: 'Example_App',
    responseType: 'code',
    scope: 'offline_access Example',
  },
  apis: {
    default: {
      url: 'https://dev-api.example.com',
      rootNamespace: 'Example',
    },
  },
} as Config.Environment;

  1. I've added a new task to the package and run it. "build:dev": "ng build --configuration development" and yarn build:dev
  2. I've copied the DbMigrator to my server. Updated appsettings.json as follows and run the migrator
{
    "ConnectionStrings": {
      "Default": "Server=localhost\\sqlexpress;Database=Example-Dev;Trusted_Connection=True;MultipleActiveResultSets=true"
    },
    "IdentityServer": {
      "Clients": {
        "Example_Web": {
          "ClientId": "Example_Web",
          "RootUrl": "https://dev-web.example.com/"
        },
        "Example_App": {
          "ClientId": "Example_App",
          "RootUrl": "https://dev-api.example.com/"
        },
        "Example_Blazor": {
          "ClientId": "Example_Blazor",
          "RootUrl": "https://localhost:44307"
        }
      }
    },
    "AbpLicenseCode": "..."
  }
  
  1. I've deployed the API project with matching values in the appsettings.json
{
  "App": {
    "SelfUrl": "https://dev-api.example.com/",
    "ClientUrl": "https://dev-web.example.com/",
    "CorsOrigins": "http://dev-web.example.com/,https://dev-web.example.com/"
  },
  "ConnectionStrings": {
    "Default": "Server=localhost\\SQLExpress;Database=Example-Dev;Trusted_Connection=True;MultipleActiveResultSets=true"
  },
  "AuthServer": {
    "Authority": "https://dev-api.example.com",
    "RequireHttpsMetadata": "true"
  },
}

The Issue I can browse the Swagger document and the Angular app fine, but when I try to log in I get the error screen from the API stating
500 Internal Server Error UNAUTHORIZED_CLIENT

and the following messages in the log 2020-11-02 11:04:48.240 +00:00 [ERR] Invalid redirect_uri: https://dev-web.example.com/ {"ClientId":"Example_App","ClientName":"Example_App","RedirectUri":null,"AllowedRedirectUris":["https://dev-api.example.com","https://dev-web.example.com"],"SubjectId":"anonymous","ResponseType":null,"ResponseMode":null,"GrantType":null,"RequestedScopes":"","State":null,"UiLocales":null,"Nonce":null,"AuthenticationContextReferenceClasses":null,"DisplayMode":null,"PromptMode":null,"MaxAge":null,"LoginHint":null,"SessionId":null,"Raw":{"response_type":"code","client_id":"Example_App","state":"MldHMGt1TnZkS0ItcnBXQzU1WGROck9LTWp5MGlzdFJEdjV0UE9sMS5DUjdD","redirect_uri":"https://dev-web.example.com/","scope":"openid offline_access Example","code_challenge":"vXXK9P8NZ7zMPbzktJetY4amyp5F1sqWU-rYTpQPJ3c","code_challenge_method":"S256","nonce":"MldHMGt1TnZkS0ItcnBXQzU1WGROck9LTWp5MGlzdFJEdjV0UE9sMS5DUjdD"},"$type":"AuthorizeRequestValidationLog"}

What's wrong, and what is the processess for deploying an appilcation to a live environment?

Hi @liangshiwei,

I've deleted the database, changed the migrator appsettings.json as you describe and re-run the migrator against a new empty database and the problem persists.

Can I share those privately?

@armanozak I'm pretty new with Angular and ABP. Is there anything we need to take into account with the service proxies that ABP gives us or do they play nicely with service workers?

ok, thanks 👍🏻

Showing 1 to 10 of 24 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11