Error occurs when enabling the dynamic user level

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
lfernandes
User
Posts: 77

Error occurs when enabling the dynamic user level

Post 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)


lfernandes
User
Posts: 77

Post 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()

MichaelG
User
Posts: 1110

Post by MichaelG »

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


lfernandes
User
Posts: 77

Post by lfernandes »

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

thanks


Post Reply