c# Sql SiteMap Provider security Trimming 不起作用
当我使用 web.sitemap 时,菜单上的安全修剪工作正常。 现在我已经切换到 Sql Site Map Provider,安全调整就停止工作了。
<siteMap enabled="true" defaultProvider="AspNetSqlSiteMapProvider">
<providers>
<add name="AspNetSqlSiteMapProvider" type="SqlSiteMapProvider" securityTrimmingEnabled="true" connectionStringName="SiteMapConnectionString" sqlCacheDependency="SiteMapDatabase:SiteMap"/>
</providers>
</siteMap>
我必须编辑 proc_GetSiteMap 才能以正确的排序顺序返回菜单项,但它返回站点地图表中的所有相关数据(包括角色)。
任何帮助将不胜感激。
While I was using web.sitemap the security Trimming on my menu was working fine.
Now that I have switched to a Sql Site Map Provider, the security trimming just stopped working.
<siteMap enabled="true" defaultProvider="AspNetSqlSiteMapProvider">
<providers>
<add name="AspNetSqlSiteMapProvider" type="SqlSiteMapProvider" securityTrimmingEnabled="true" connectionStringName="SiteMapConnectionString" sqlCacheDependency="SiteMapDatabase:SiteMap"/>
</providers>
</siteMap>
I have had to edit the proc_GetSiteMap to return my menu items in the correct sort order, but it returns all the relevant data from the sitemap table (including the roles).
Any help would be apreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否限制了对应使用 web.config 文件限制的文件夹的访问。
例如:
在搜索时找到一个链接,您也可以查看它:
http://www.mytakeon.net/post/2006/09/The-SQL-SiteMap-Provider-and-trimming-by-roles-%28originally-posted-2006-09-20 %29.aspx
Have you restricted access to the folders that should be restricted with a web.config file.
for example:
while searching found a link you may also have a look at it:
http://www.mytakeon.net/post/2006/09/The-SQL-SiteMap-Provider-and-trimming-by-roles-%28originally-posted-2006-09-20%29.aspx