Base solution for your next web application

Activities of "leonkosak"

I have question, because I do not completely understand how these timezone things are working. Currently, I have ANZ 6.3-based app (.NET Core + Angular 7 - moment 2.22.2, moment-timezone 0.5.23), but I belive that this applies identically to the latest version of ANZ. There is NO CHANGES for Clock provider (https://aspnetboilerplate.com/Pages/Documents/Timing) in Startup.cs (so "UnspecifiedClockProvider" is used), which I can confirm based on brakepoints in Application projects for Clock.Kind, Clock.SupportsMultipleTimezone and Clock.Provider values.

On dx-date-box (DevExtreme component), there is moment.Moment variable connected and when this variable is sent to backend (AppService) (completely unmodified in typescript), we can see UTC value for DateTime on C# side model (our thimezone is +2). So accepted value is 2 hours behind. However, I noticed, that this DateTime propery (on C# side) has property "Kind" value "Utc". https://docs.microsoft.com/en-us/dotnet/api/system.datetime.kind?view=netcore-2.2

So, how C# backed (DateTime propery in accepted model) has information about "Utc kind" of datetime (provided from moment.Moment variable on Angular side)?

including connection string or just tenantid value?

Sorry for late reply.

https://aspnetboilerplate.com/Pages/Documents/Abp-Session?searchKey=abpsession#overriding-current-session-values

Is changing tenantId database context also works inside using block?

using (_session.Use(42, null)) { //correct database context (connection string) for explicitly defined tenantId if this tenant has dedicated database (not using host database)? }

If I set ExpireDate (in AbpUserTokens table) manually for specific user (this kind of user is used for external system authentication which does NOT call Login and Logout method - just using bearer token which is generated by us (first login) and then ExpireDate is "manually corrected" to (very) distant future datetime).

Is this approach "stable and good enough) for life-long authentication? (I know that from a security perspective this is obviously very bad to have jwt token with a distant expiration date.)

In MVC (jQuery) solution is IdentityServer enabled by default: https://docs.aspnetzero.com/documents/aspnet-core-mvc/latest/Infrastructure-Core-Mvc-Identity-Server4-Integration

In Angular documentation, Identity Server 4 is not even mentioned: https://docs.aspnetzero.com/documents/aspnet-core-angular/latest/Infrastructure-Angular

But defferences table shows:

https://docs.aspnetzero.com/documents/common/latest/Version-Differences#version-differences-table

In Angular solution, Identity Server is also diabled by default.

Why such differences between projects?

My bad. :( I forgot that I did this once in the past.

CreateOrMigrateForTenant(AbpTenantBase tenant, Action<TDbContext> seedAction);

in migrator executer: _migrator.CreateOrMigrateForTenant(tenant, SeedHelperTenantCustom.SeedTenantDb);


public class SeedHelperTenantCustom
    {
        public static void SeedTenantDb(IIocResolver iocResolver)
        {
            WithDbContext<ThynkrDemoDbContext>(iocResolver, SeedTenantDb);
        }

        public static void SeedTenantDb(ThynkrDemoDbContext context)
        {
            new InitialTenantDbBuilderCustom(context).Create();
        }

        private static void WithDbContext<TDbContext>(IIocResolver iocResolver, Action<TDbContext> contextAction)
            where TDbContext : DbContext
        {
            using (var uowManager = iocResolver.ResolveAsDisposable<IUnitOfWorkManager>())
            {
                using (var uow = uowManager.Object.Begin(TransactionScopeOption.Suppress))
                {
                    var context = uowManager.Object.Current.GetDbContext<TDbContext>(MultiTenancySides.Tenant);

                    contextAction(context);

                    uow.Complete();
                }
            }
        }
    }
    

How can I obtain tenantId for current tenant context in SeedTenantDb method (action)? Thank you.

Unfortunatelly, this does not work for ANZ 7.0 for Croatian (hr) language.

https://github.com/aspnetzero/aspnet-zero-core/issues/2451

Whole ANZ fallse back to En language.

Yes, this is the best option - OU. OU in combination with permissions = "perfect" control

I do not understand what is your problem exactly. Just prefix "/app/main" and that's it. Before "/app" is "base URL". It's also good to have ability to change module (we do not implement application inside "main" but inside our custom Angular modules".

Showing 21 to 30 of 55 entries