Base solution for your next web application

Activities of "gjubber"

Answer

Hi,

Ah, lovely user error.

Thank you for the clarification, I can see the page now.

Kind regards, Robert

Answer

Hi,

Thank you for the feedback! However, I receive a 404 if I navigate to the link. I assume it is not live yet?

Kind regards, Robert

Answer

Hi,

Thank you.

Question

Hi,

Hope you are well.

We want to implement dynamic permissions within our application and I wanted to find out if this is possible and/or if you can share any resources of how one could achieve this?

The scenario:

When adding a specific entity (eg. Category), we want to dynamically create a permission associated with this specific entity.

With a "normal" implementation, we would create the entity and "manually" create permissions for CRUD operations of the entity in the AppAuthorizationProvider. However, we want to give the users the ability to create/update/delete their own "categories", but we still want to associate permissions with that "category" in order to manage who will be able to use that "category".

I have found the following blog posts, but the examples mentioned is not 100% clear:

  • https://support.aspnetzero.com/QA/Questions/12245/Dynamic-Permission
  • https://support.aspnetzero.com/QA/Questions/12214/Add-a-new-permission-from-the-database-in-SetPermissions-method-in-the-AppAuthorizationProvidercs
  • https://support.aspnetzero.com/QA/Questions/11619/ChangeAddRemove-Role-Permission-Tree-Root-Menu-Item-Dynamically

Any assistence with regards to this question is much appreciated.

Kind regards, Robert

Unfortunately those are the only log entries that match the point in time.

I can see they are coming from here and occur directly after attempting to switch the language. I'd hoped the localization key "Abp.Authorization.Roles.RolePermissionSetting" might be a clue. Almost seems like it is trying to use localization entries (A permission name in this case) that do not exists.

Something I have not yet checked is the AbpAuditLogs table. I'll request access and provide more detail as soon as I can. If you have any other places you recommend I take a look I'd appreciate it.

Hi support,

We are using the following setup: Project Type ASP.NET CORE & Angular (single solution)

Framework .NET Core 3.1

Version v9.1.0

This is an odd issue. I am unable to replicate on my local environment but in both our production and dev instances (Hosted on IIS) the following is occuring:

  1. Change the default language in Host from English to English(UK)

  2. If a user tries to change their language to English(UK) from English the page refreshes and the language does not change

  3. The following log entries appear

WARN 2021-11-19 08:26:48,672 [46 ] naries.DictionaryBasedLocalizationSource - Can not find 'Abp.Authorization.Roles.RolePermissionSetting' in localization source WARN 2021-11-19 08:26:48,682 [46 ] naries.DictionaryBasedLocalizationSource - Can not find 'Abp.MultiTenancy.TenantFeatureSetting' in localization source WARN 2021-11-19 08:26:48,682 [46 ] naries.DictionaryBasedLocalizationSource - Can not find 'Abp.Application.Features.EditionFeatureSetting' in localization source WARN 2021-11-19 08:26:48,683 [46 ] naries.DictionaryBasedLocalizationSource - Can not find 'Abp.Configuration.Setting' in localization source

Any idea what could be causing this?

I have just encounter this myself. Has any progress been made on this?

Cause The problem seems to be caused by the service proxy being initialized before the API_BASE_URL has been set. This seems to cause a knockon effect on any other service proxy injected into a constructor. In practice this leads to all proxy calls going to undesireable domains and that is why nothing loads because the endpoints are invalid.

Source: service-proxies.ts:

export const API_BASE_URL = new InjectionToken<string>('API_BASE_URL');

Workaround I have found a workaround to this for now, but I don't know if this has severe side effects yet. On your ngRx Effect instead of injecting your service proxy in the constructor inject an Injector and for convenience use an accessor to keep your code the same.

I.e. Instead of

constructor(private actions$: Actions, private demoService: DemoServiceProxy) {}

use


    get demoService(): DemoServiceProxy {
        const { injector } = this;
        return injector.get(DemoServiceProxy);
    }

    constructor(private actions$: Actions, private injector: Injector) {}

So it would seem that the latest version of aspnet-zero has a HomeController. This dictates the path which it will follow. One should keep in mind that Development, is subjective to the environment. Thus Development could also refer to a development server. Which in this cause, caused allot of issues, because it point to the wrong location (Ui/Login).

Prerequisites

  • Using version 8.9.2
  • Angular
  • net core 3.1

Issue

Please note, the following does not happen on my development environment

After I have deployed the code to the development environment, I would expect the default login URL to be (as it's been on various other implementations):

https://<domain>/account/login

But it keeps opening the following:

https://<domain>/Ui/Login

Furthermore, once I eventually worked around the login issue and finally get to the app, where I can create a role for example, I am confrusted with the following error when trying to POST or PUT any data

ERROR 2020-08-24 07:05:40,637 [40   ] idateAntiforgeryTokenAuthorizationFilter - The required antiforgery header value "X-XSRF-TOKEN" is not present.
Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The required antiforgery header value "X-XSRF-TOKEN" is not present.
   at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.ValidateRequestAsync(HttpContext httpContext)
   at Abp.AspNetCore.Mvc.Antiforgery.AbpValidateAntiforgeryTokenAuthorizationFilter.OnAuthorizationAsync(AuthorizationFilterContext context)

Why is it navigating to https://<domain>/Ui/Login. Identity server is not being utilised and I have no idea why it's pointing to the controller/view

Any help would be greatly appreaciated!! Kind regards

To whom this may concern,

Is there any documenation or tools, that can assist us in upgrading our previous version (v5.5.0) of AspNetZero, to the latest version (v8.0.0). Alternatively, is there any advice you guys can provide us on how to go about this.

Many thanks in advance! Kind regards, Richard Bailey

Showing 1 to 10 of 12 entries