Base solution for your next web application

Activities of "dexmox"

Hi All,

Thank you in advance.

I am looking for the best way to include Idle Timer / Session Timeout into an Angular + Core Zero project.

What is the best way to handle logout after a session time is reached - configurable per tenant (stored in a settings table) that will display a lockout modal and stop any further action / navigation until they log back (including if they press refresh).

If anyone could provide an example / provide a link to an implementation or point me the general direction.

Thank you kindly. Regards. Dex.

Hi All,

I have looked through the forum for an example but I dont understand how to implement it.

Could someone please provide some detailed steps for importing and using the external-events from metronic into angular SPA?

Thank you kindly in advance for any and all assistance.

Kindest Regards, Dex

When will V7 be ready for download from aspnetzero site as it has been completed in github ?

Thanks in advance.

Could someone please tell me what the benefits and differences are and which is better to use for doing ajax table updates and why ?

_personService.createPerson(person).done(function () {
                _modalManager.close();
                 // some ajax table updates and stuff here
            }).always(function () {
                _modalManager.setBusy(false);
            });

https://docs.aspnetzero.com/documents/aspnet-core-mvc/latest/Developing-Step-By-Step-Core-Saving-Person

VS

abp.ajax({
    url: '/People/SavePerson',
    data: JSON.stringify(newPerson)
}).done(function(data) {
    abp.notify.success('Created new person with id = ' + data.personId);
    // some ajax table updates and stuff here
});

https://aspnetboilerplate.com/Pages/Documents/Javascript-API/AJAX

Thanks in advance.

Power Tools 2.0.2.1 - Is it possible to create views only from manually created Model/Entity

Example:

  1. Created an entity without powertools.
  2. Created API without powertools
  3. Want to generate index, edit, create

Let me know if i need to be more specific about what i am trying to achieve.

Issue: AppService is inserting 3 rows instead of one.

What I am trying to achieve is a link table for many to many relations between 3 entities. It appears to be creating one of each type of link between the three entities,

A true fale A false true A true true

But I dont understand why, any assistance would be greatly appreciated and thanks in advance. I believe this may have more to do with EF Core but I am not sure whats wrong here.

public class ModelOne : FullAuditedEntity<long>, IMustHaveTenant
{
        public virtual int TenantId { get; set; }
        public virtual ICollection<ResLink> ResLinks { get; set; }
}
public class ModelTwo : FullAuditedEntity<long>, IMustHaveTenant
{
        public virtual int TenantId { get; set; }
        public virtual ICollection<ResLink> ResLinks { get; set; }
}
public class ModelThree : FullAuditedEntity<long>, IMustHaveTenant
{
        public virtual int TenantId { get; set; }
        public virtual ICollection<ResLink> ResLinks { get; set; }
}
public class ResLink : FullAuditedEntity<long>, IMustHaveTenant
{
        public virtual int TenantId { get; set; }
        
        public virtual long? ModelOneId { get; set; }
        public virtual ModelOne ModelOne { get; set; }
   
        public virtual long? ModelTwoId { get; set; }
        public virtual ModelTwo ModelTwo { get; set; }
        
        public virtual long? ModelThreeId { get; set; }
        public virtual ModelThree ModelThree { get; set; }      
}
public async Task CreateResLink(CreateResInput input) {
    foreach (var resInput in input.ResLinks)
    {    
        var res = new ResLinkDto
        {
            TenantId = AbpSession.TenantId.Value,    
            ModelOneId = resInput.modelOneId,            
            ModelTwoId = resInput.modelTwoId,
            ModelThreeId = resInput.modelThreeId.    
        };

        await _resLinkRepository.InsertAsync(ObjectMapper.Map<ResLink>(res));
    }
}

Insert Result: ID Date User Id M.Date M.User IsDeleted D.Uid D.Time TenantId ModelOneId ModelTwoId ModelThreeId 30050 06/08/2019 13:26:54 6 NULL NULL False NULL NULL 1 1 NULL 180026 30051 06/08/2019 13:26:54 6 NULL NULL False NULL NULL 1 NULL 1 180026 30052 06/08/2019 13:26:54 6 NULL NULL False NULL NULL 1 1 1 180026

Hi Again,

Thanks in advance.

What would cause throw new UserFriendlyException to not display a popup with the message in one section of my app but show the popup in another ?

They both log to log.txt

Hi All,

Just wondering if there is a way to log in as a user - without "Impersonating" the user (without logging out). Think of this as a "swap logged in user to selected user" function ?

Scenario: Logged in user clicks on a button which is example called "swap", and another person then click on log in; is then prompted for a password/pin and user is swapped to another user when password/pin is matched. All privelidges and access are re-evaluated for the user swapped into.

Thanks in advance.

Hi All,

Thanks in advance!

I am trying to switch to using Rider IDE and everything is compiling and launching - web application works but IDE is displaying an error on _ViewStart.cshtml : Cannot resolve symbol 'GetTheme'

After navigating to the same file in VS2019 it also started complaining about not being able to resolve (never complained about this file in 4 months+).

This is the only error in the entire solution, and happens on both IDE's, but both compile and run the application.

Is this a possible bug or a mistake i've made ?

Any solutions would be greatly appreciated.

Rider: l

VS 2019:

Hi All,

Thanks in advance for any and all assistance.

I think my issue is to do with passing a parameter to the ajaxFunction appService method. the listAction call works fine if I dont try use a different function without parameters. ( example: appService.GetAllExamplesList() ).

I checked the datatable website, stack overflow, google and the forums, but I have not had any success in finding any examples of loading a datatable with a parameter such as Id.

My DataTable is throwing error : Uncaught TypeError: listAction.ajaxFunction is not a function

I am sure im doing something wrong below in my code, and it should explain what I am trying to achieve if the above was confusing.


var dataTable = $table.DataTable({
        paging: true,
        processing: false,
        stateSave: true,
        searching: true,
        listAction: {
            ajaxFunction: appService.getExampleById(exampleId)           
        },
        columns: [
            {
                 targets: 0,
                 data: "name",
                 render: function (data) {
                     return data;
                }
            }
    });
Showing 1 to 10 of 18 entries