Page 1 of 1

Error occurs when enabling the dynamic user level

Posted: Sun Jan 28, 2024 4:28 pm
by lfernandes

Error occurs when enabling the dynamic user level level. What may be causing such a problem?

An unhandled exception occurred while processing the request.
NullReferenceException: Object reference not set to an instance of an object.
ASPNETMaker2023.Models.ead2024+AdvancedSecurityBase.SetupUserLevels() in AdvancedSecurityBase.cs, line 639

DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor()' on type 'AdvancedSecurity'.
Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()

DependencyResolutionException: An exception was thrown while activating ASPNETMaker2023.Models.ead2024+AdvancedSecurity.
Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action<ResolveRequestContext> next)


Re: Error occurs when enabling the dynamic user level level.

Posted: Mon Jan 29, 2024 5:16 am
by lfernandes
NullReferenceException: Object reference not set to an instance of an object.
ASPNETMaker2023.Models.ead2024+AdvancedSecurityBase.SetupUserLevels() in AdvancedSecurityBase.cs
+
            QueryBuilder qb1 = privTbl.GetQueryBuilder()
ASPNETMaker2023.Models.ead2024+AdvancedSecurityBase.SetupUserLevel() in AdvancedSecurityBase.cs
+
            SetupUserLevels().GetAwaiter().GetResult(); // Load all user levels
ASPNETMaker2023.Models.ead2024+AdvancedSecurityBase.LoadUserLevel() in AdvancedSecurityBase.cs
+
                SetupUserLevel();
ASPNETMaker2023.Models.ead2024+AdvancedSecurityBase..ctor() in AdvancedSecurityBase.cs
+
            LoadUserLevel();
ASPNETMaker2023.Models.ead2024+AdvancedSecurity..ctor() in AdvancedSecurity.cs
+
        public AdvancedSecurity() : base()
lambda_method448(Closure , object[] )
Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()

Re: Error occurs when enabling the dynamic user level level.

Posted: Mon Jan 29, 2024 8:17 am
by MichaelG

Make sure that you have generated the User Levels / User Level Permissions tables.


Re: Error occurs when enabling the dynamic user level level.

Posted: Mon Jan 29, 2024 9:44 am
by lfernandes

Thank you very much!!!! I found that the permission table was just loaded without being marked to generate file. Problem solved!!!!!

thanks