Base solution for your next web application

Activities of "paradoxit"

I'm using the Angular + ASP.Net version of the site and can't seem to find any reference for:

SecurityStampValidator or app.UseCookieAuthentication

Can you please advise what code changes are need for the Angular4 project? Having the website log out exactly 24 hours after login is very frustrating for end-users.

Thanks in advance, David

Hi,

Thanks for the quick response I'll read the articles now.

Kind regards, David Hawkins

Is this something I need to implement on the Angular side as you login? I.e. lookup the users tenant and then set a cookie? If so how do I implement setting the cookie?

Hi,

I'm actually using Angular and WebAPI, is the NoWrap option possible still in the app service?

If not I can create a controller as you described but I don't know how to authenticate against it as authentication is done automatically in the Angular <-> AppService communication. Is there any guides on Angular <-> Custom controller auth, as I would like to access data such as tenantId from inside the controller but they are null.

Thanks for your help on this. Kind regards,

David Hawkins

Thanks ismcagdas

Hi ismcagdas,

Thank you for replying. I don't however know what the current logged in users culture is from the server side, how can I find this out?

Kind regards, David Hawkins

Thanks this worked great!

I updated my root-routing.module.ts file to preload all lazy loaded routes and now there is no delay.

See below code:

import { NgModule } from '@angular/core';
import { Routes, RouterModule, PreloadAllModules } from '@angular/router';

const routes: Routes = [
    { path: '', redirectTo: '/app/main/home', pathMatch: 'full' },
    {
        path: 'account',
        loadChildren: 'account/account.module#AccountModule', //Lazy load account module
        data: { preload: true }
    }
];

@NgModule({
    imports: [RouterModule.forRoot(routes,
    {
        preloadingStrategy: PreloadAllModules
    }),],
    exports: [RouterModule],
    providers: []
})
export class RootRoutingModule { }

Thanks, I tried it in production and it's still 3-4 seconds.

I'll look into how to disable lazy loading for that module. I also heard about a feature called Preloading.

Kind regards,

David

cangunaydin that worked for the logout null issue thanks! :)

Showing 1 to 10 of 19 entries