我已经按照FluentSecurity - Getting Started in an asp.net MVC5 app 中的说明安装并配置了 Fluentsecurity。但是当我忽略缺少的配置时出现错误。
错误消息是“ FluentSecurity.ConfigurationExpression 不包含 IgnoreMissingConfiguration 的定义”
SecurityConfigurator.Configure(configuration =>
{
// Let FluentSecurity know how to get the authentication status of the current user
configuration.GetAuthenticationStatusFrom(() => HttpContext.Current.User.Identity.IsAuthenticated);
// This is where you set up the policies you want FluentSecurity to enforce on your controllers and actions
configuration.For<HomeController>().Ignore();
configuration.For<AccountController>().DenyAuthenticatedAccess();
//configuration.For<AccountController>(x => x.()).DenyAnonymousAccess();
configuration.For<AccountController>(x => x.LogOff()).DenyAnonymousAccess();
configuration.For<AccountController>(x => x.Login("")).Ignore();
configuration.IgnoreMissingConfiguration();
configuration.For<GuestsController>(x => x.Index()).Ignore();
configuration.For<GuestsController>(x => x.Create()).RequireRole(BlogRole.Writer);
});
我在这里想念什么?