Base solution for your next web application

Activities of "rickfrankel"

Hi,

  1. Downloaded a new and empty v13.1.0 solution from the website.
  2. Run the angular front end (no changes just a yarn install).
  3. Open the backend solution and enable Redis (uncomment lines 105-109 in XXXWebCoreModule.cs)
  4. Run the backend
  5. Login to the site
  6. Go to tenants
  7. And edit the features on the Default tenant.
  8. Enable the [Test tenant scope feature]
  9. Click Save
  10. Open the edit features on the Default tenant modal again
  11. The feature is not enabled.
  12. You can do this over and over and it won't enable the feature in the UI or in the actual code.

HOWEVER the feature is enabled in the DB and in Redis itself. It's just that when you get that feature back from redis it won't be set to true for some reason.

We've tried debugging the aspnetboilerplate to find where this goes wrong and we couldn't narrow it down.

Thanks Rick

Hi,

We are on v13.1.0. Angular front end, .net core backend (separate projects).

We cut and paste the html from this page, into a simple component. https://preview.keenthemes.com/html/metronic/docs/base/cards#collapsible

The collapsing section doesn't work. It looks to be something to do with how the new Metronic uses bootstrap cards and bootstrap collapse.js

I can't figure out how this should work and be initialized etc. I notice plugins.bundles.js is never included which seems to include bootstrap so not sure if that is the problem.

I also notice that KTApp.init() is never called any more (it used be called by app.js in a DomContentLoaded but that is now gone), so not sure if that is the issue either.

Are you able to help with what is going on and why they don't work.

Thanks Rick

Hi All,

I'm going to document notes of frustration here on the upgrade from v12 to v13.

First thing is the change from Newtonsoft to System.Text.Json is massive and one to be very aware of.

Issue List

  1. The change to System.Text.Json breaks serialization of TimeSpan objects if you are using them in your DTO's (which we were). The long story short here is that Swashbuckle doesn't know how to handle TimeSpans correctly when using System.Text.Json refer to this link for how to make it go back to using strings for them. https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/2505

Oh boy where to start on this one. If you are storing json in the DB at all you're going to have a lot of fun. System.Text.Json doesn't use camelCase by default and our Json was all camelCase. That's easy enough to work around you can just use the JsonExtensions.CreateJsonSerializerOptions and pass in the correct parameters when you are using FromJsonString etc.

Next thing to note however is that CreateJsonSerializationOptions adds in a bunch of AbpConvertors. One of them doesn't play nicely with nullable objects. Eg: We have a nullable int. We want to also use the numberhandling options to allow for numbers to be strings. ~~ Except this doesn't work when you have a nullable int because the AbpConvertor takes over and doesn't respect the numberhandling options or attributes.~~

Ok the attribute doesn't work but the options on the seralizer do. However you need to note that the serializer options are cached and once they are setup and used once they cannot ever be changed. We had to modify our startup.cs to create the JSON serialisation options with all combinations of camelcase and write intended. Set the number handling options we want there to ensure the options were cached with our correct settings from the start.

To handle that we have to manually remove that convertor from our options after creation and then it seems to work.

  1. We were using Metronic card objects and creating them dynamically using new KTCard(#xxxx). The Metronic upgrade changes how card's work and they are now based off of Boostrap cards, which removes card.js and also removes KTCard and the way it works. We haven't found a work around yet. Will update this ticket if/when we find a workaround.
    • WORKAROUND: We were using collapsing cards which is why we needed to new KTCard them. We can use ngx-bootstrap collapse and got around this problem. Not native metronic but it works.

~~3) Scrollbars in modals seem to disappear when the modal loses focus. This is in particular to scrollbars which exist within the modal and not full pages scrollbars. We're still investigating this one.~~ This is not an issue and was our own fault.

  1. Features and redis caching and potentially other items you cache are broken. See the link in the comment below. More to come :)

Hi Support Team,

Do you have any ideas what could be causing this error. https://github.com/aspnetboilerplate/aspnetboilerplate/issues/6755

I have been developing alone for a while now with no problems on version 12.4.2.

Recently something has happened to my machine and now when I try and browser to the swagger page (or run nwswag) I get the same error as linked in that article.

I could try and upgrade to version 13 which I believe is the version in which that issue is fixed. But I have others on my team using the same code as me who don't have the issue.

My guess is something related to either a windows or .net patch or update but we haven't been able to isolate it yet.

Do you have any ideas what could be causing this issue all of a sudden for me?

Thanks Rick

We have a bunch of widgets defined for our tenant dashboard and most of them have permissionDependencies on them to control which of our tenants can see what widgets.

Our defaultTenantDashboard is configured to have all the tenant widgets available to them.

(All above setup in DashboardCustomisation.cs).

In the GetDefaultAngularTenantDashboardView() method we have setup the dashboard to include widgets that not all users will have access to. The permissions control which ones actually get displayed.

Now if a tenant tries to "Back to Default" or delete the last page on their dashboard. They will get an error if they do not have access to a particular widget that is defined in the GetDefaultAngularTenantDashboardView.

The error comes from the DashboardCustomisationAppService and in the SaveDashboardSettingForUser() method, which has been passed the GetDefaultDashboardValue from the DeletePage method.

In this case the dashboard that is passed into this method already has widgets on it that the user is not authorized to see and thus the check around allWidgetsOfDashboard.Any etc fails and we throw the UnknownWidgetId error.

Essentially because our DefaultAngularDashboard includes widgets that not all users will see in it and it is filtered out elsewhere we fail.

Could this please be looked into.

Thanks Rick

Hi,

Could I request a feature/method of adding a permission that doesn't automatically get added to the admin role.

I have a scenario where I have 2 or 3 permissions that are for very specialist functions that no roles should have by default.

Every other permission I want the admin role to get by default. I would love for there to be a way for me to add an attribute or something to the CreateChildPermission call that allows me to say this permission should not be given to anyone by default, including static roles that actually want all permissions by default.

Thanks Rick

Hi,

It looks as though a combination of ngx-bootstrap tooltips and raw bootstrap tooltips are being used and I'm unsure which ones we should use.

Eg: Roles and tenant settings pages use the raw bootstrap tooltips and other pages (tenant features, widgets and others) use the ngx-bootstrap.

Furthermore the ones that use the raw bootstrap ones (or at least the metronic wrapper around it). Use a strange syntax of data-toggle="tooltip" instead of data-bs-toggle="tooltip"

Further to this none of the other standard options for the bootstrap tooltip and the ones documented on the metronic site don't work either. https://preview.keenthemes.com/html/metronic/docs/base/tooltips#delay-options

Eg:

I add data-bs-delay-hide="1000" to the roles.component.html tooltip and it doesn't work. I tried with data-delay-hide as well. No good.

I also see a lot of default things being set in the metronic theme that don't get applied such as all of the following styles in the style.bundle.css

/* rtl:end:ignore */ .tooltip-inner { max-width: var(--bs-tooltip-max-width); padding: var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x); color: var(--bs-tooltip-color); text-align: center; background-color: var(--bs-tooltip-bg); border-radius: var(--bs-tooltip-border-radius); }

In particular I'm trying to configure the max-width. I've tried it using the bootstrap options to add my own custom css class (as per above doesn't work).

-bs-tooltip-max-width is set to 200px by default but if I change the title of the roles.component.html tooltip to a really long string it doesn't adhere to the max width.

Some magic appears to be going on that I couldn't find yet :)

Any tips on how we should be doing this consistently.

Thanks Rick

Application.Current.Quit is used in I think two places in the MAUI project.

However this doesn't actually work on IOS and does nothing. There is a suggested workaround here (however not necessarily recommended).

https://learn.microsoft.com/en-us/answers/questions/1142884/how-to-close-net-maui-app-on-ios

We're working around it for now but noticed it caused a strange behaviour issue that when you say no to a retry it behaves as if you clicked yes.

Using 11.2.

When using the MAUI app, if the refresh token fails due to it being invalid then the MAUI app automatically quits and there isn't a way to recover other than to uninstall the app (or clear the app data/cache) and then you are ok.

The quit happens because UserConfigurationManager has an error handler in the call to _userConfigurationService.GetAsync

The failure looks to be in AccessTokenmanager.cs in the RefreshTokenAsync call.

The ReceiveJson section of the client triggers the AbpExceptionHandler code to run. In our case the call to the RefreshTokenAsync is returning a 500 internal server error (on the server side we can see it is a refresh token is not valid error). This then gets handled as an error. We don't see any dialogs and the code fails all the way out to the error handle in the GetAsync call at the top and quits the app.

Expected result: If the refresh token is not valid then you should just see a login screen and the _userConfigurationService.GetAsync call should be treated as if the user wasn't authenticated and there was no saved session for them.

Easiest way to reproduce it is to debug and modify the refresh token on the call such that it becomes invalid. The actual scenario we have is that we're debugging another completely random issue and switching between environments. This causes all sorts of issues with our tokens. However in prod this could become a real issue when the refresh tokens eventuall expire.

Thanks Rick

When using the MAUI app on landscape views on a tablet. There are a few issues.

  1. Login page is not centered on the page.
  2. The page header is covered by the static left hand nav. The action button is also not right aligned on the page.

See images for second item.

Thanks Rick

Showing 1 to 10 of 39 entries