element in the web.config? Do I need to do something with that as well?
At the moment I can't get use Roles.GetRolesForUser("") method (returns nothing) but have to do it like Roles.Provider.GetRolesForUser("")?
The biggest problem is with the sitemaps as it doesn't get into the Roles.IsUserInRole method. For the moment I am using a custom xmlsitemapprovider for this but it isn't neat.
I enabled the rolemanager and the set the securitytrimmingenabled to true for the sitemap in the web.config.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
是的,您需要在 web.config 中配置自定义角色提供程序 - 如下所示:
您还应该设置 安全调整也为true。 例如。
Yes, you need to configure your custom Roles provider in web.config - something like this:
You should also set security trimming to true, too. eg.