Base solution for your next web application

Activities of "davidharrison"

Hi @alper,

Thank you for your responce. I am definately logged into the application when trying to revcieve the auth token, but the abp.auth.getToken() method still returns null, and the "Abp.AuthToken" cookie does not appear to be present in the browser.

Do you know what might cause the cookie to not be set and available like this? Are there parts of the application where behaviour like this could inadvertently be configured?

Thanks,

David

Question

Hi Guys,

When I'm logged into the applciation, I want to be able to get my current AuthToken. In the browser console, if I look at the abp.auth object, one if the properties is tokenCookieName which is set too "Abp.AuthToken", but the browser doesn't have a cookie called "Abp.AuthToken". There is also a function called getToken, but if I call this in the console, I only get a null result, presumably because there isn't a "Abp.AuthToken" cookie?

How do I get the current auth token client side? Does something additional need to be configured in the application?

Thanks,

David

project is .NET Core Zero 6.9 MVC & jQuery

When we swap the slots, the domain names don't change - the clients using the production site/domain would still be using the same site/domain after we swap, it's just that the code in that environment has changed. So a cookie for domain xyz should still be valid.

We strongly believe that it is server-side session invalidation that causes the users to be logged out and forced to log in again, and that is what we are trying to find a solution for.

Hi guys,

We're currently using .Net Core MVC + jQuery version 6.9.

We host our application in Azure and when we swap our application slots between staging and production, all current users on the system get kicked and are forced to log in again, due to a loss of session.

We've done some research into session management with .Net and Azure, and there seem to be a few options, but we also noticed that in the .Net Zero Documentation it says:

ASP.NET Boilerplate provides an IAbpSession interface to obtain the current user and tenant without using ASP.NET's Session.

Does this mean that any standard methods for managing session will not work with .Net Zero? If not, has anyone implemented an alternative?

If this isn't an issue, then the three main methods that we've come across so far are these:

1.Table Storage 2.SQL Azure 3.Windows Azure Caching (using Redis)

Has anyone implemeneted one of these session management techniquies? Where there any hidden pitfalls or traps that you encountered? Alternatively, does anyone from the .Net Zero team have feedback/suggestions on this matter?

Thanks,

David

Hi @Maliming

I donwloaded a fresh demo project and the menu items show and hide as expected, with their display being governed by both feature dependancy and permission dependancy.

Clearly there is an issue with my project. Would you have any suggestions/ideas as to where or what the issue might be, as to why my menu items are not showing/hiding correctly?

I've defined the features in AppFeatureProvider.cs and defined the constants in AppFeatures.cs. I've then assigned features to editions and places the featureDependancy checks on the menu items. Have I missed a step?

Hi @Ryancyq, Yes that's correct - it's a tenant admin with all permissions but the tenant lacks the feature, and thus, the admin user not should be able to see or interact with it.

I tried swapping the order of the permissionDependancy and the featureDependancy, just incase their defined order in the Navigation provider affected the outcome of the FillUserMenuItems method, but to no avail.

I also implemented the feature checker, which does return false on the tenant admin having the feature, but the menu item still displays.

Hi @Ryancyq - the GetMenuAsync method seems to be returning all of the menu items relevant to a tenant (i.e. it doesn't contain the host dashboard), but this also means its returning the items that should be hidden. The tenant user is an admin, and from a permissions viewpoint, has permission to view those menu items, but the items should be hidden due to the tenant features.

Sorry guys, I should've led with the product details. We're using .Net Core MVC v6.9.1.

@Ryancyq - if I'm not mistaken, the above link is for an Angular solution - is there a similar method that needs to be implemented for the MVC product?

Hi all,

I'm setting up editions in my application at the moment and I want my application areas to be controlled by both features and permissions, and as an extension of that, I want to show and hide menu items, first by feature dependency and then by permission dependency. I have implemented this in the way that I understand it needs to be done, but menu items still show up when the logged in users edition doesn't allow for that feature to be seen.


.AddItem(new MenuItemDefinition(
                            FalconPageNames.Common.OrganizationUnits,
                            L("Teams"),
                            url: "Falcon/OrganizationUnits",
                            icon: "fa fa-sitemap",
                            featureDependency: new SimpleFeatureDependency(true, AppFeatures.TeamsManagement),
                            permissionDependency: new SimplePermissionDependency(AppPermissions.Pages_Administration_OrganizationUnits)
                        )

What have I done to make this not work, or what haven't I done? Any help or pointers appreciated.

We don't have the time or resources to set up another server instance to test for the issue in a fresh download, but what we could do it create an account on one of our environments for you, so that you're able to investigate?

Showing 1 to 10 of 48 entries