How to manage required features are not enabled exception in AspnetBoilerplate?

落爺英雄遲暮 提交于 2020-01-16 11:59:09

问题


According with AbpModuleZero 2.3 documentation https://aspnetboilerplate.com/Pages/Documents/v2.3.0/Feature-Management

i would like to handle AbpAuthorizationException exception raised by a Controller decorated with the RequiresFeature attribute.

For example, I would like to redirect to a static page or returning to home page.

this is my controller implementation

[AbpMvcAuthorize()]
[RequiresFeature(AppFeatures.Trattative)]
public class TrattativeController : BBWP_ABP_MPA_EFControllerBase
{        
    public ActionResult Index(){

        return View("index");
    }
}

Actually i recieve http error 500 with message

Required features are not enabled.

At least one of these features must be enabled: App.Moduli.Trattative

来源:https://stackoverflow.com/questions/59753039/how-to-manage-required-features-are-not-enabled-exception-in-aspnetboilerplate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!