Hi We are using AspNetZero (Paid) Product version --> 4.0 Product type --> MVC Product framework type --> .net core
we are using the RequiresFeature. But when Host user is hitting the URL it will give the FeatureChecker Exception "FeatureChecker can not get a feature value by name. TenantId is not set in the IAbpSession!".
How to ignore the RequiresFeature for host user?
6 Answer(s)
-
0
From https://aspnetboilerplate.com/Pages/Documents/Feature-Management#ignore-feature-check-for-host-users:
If you enabled Multi-Tenancy, then you can also ignore feature check for host users by configuring it in PreInitialize method of our module as shown below:
Configuration.MultiTenancy.IgnoreFeatureCheckForHostUsers = true;
-
0
-
0
Which version of ABP are you on?
IgnoreFeatureCheckForHostUsers
was introduced in ABP v4.2.0. -
0
@aaron Is there anyother way we can handle in our existing version. By implmenting or overriding some feature related class or any otherway?
-
0
You can override
FeatureChecker.IsEnabled
(and its async counterpart) and then replaceIFeatureChecker
. -
0
This issue is closed because of no recent activity. Please create a new issue if you are still having this problem.