在SQL Server上存储ASP.Net访问规则 [英] Store ASP.Net access rules on SQL Server

查看:102
本文介绍了在SQL Server上存储ASP.Net访问规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我知道可以在 SQL服务器上存储用户角色,但是我想知道是否还可以存储< SQL Server 上的strong>访问规则.我已经搜索了,但是什么也找不到.

So I know it's possible to store Users and Roles on SQL server but I was wondering if it was also possible to store the access rules on SQL Server. I've searched but I can't find anything.

我们的审核员要求我们运行报告,告知我们哪些用户有权访问哪些网站.目前,我正在解析每个web.config文件,以查看哪些用户/角色有权访问,将其存储在SQL Server中并运行该报告,但我希望有更好的方法.任何输入表示赞赏.

Our auditor requires us to run reports that tell us which users have access to which websites. Currently I am parsing each web.config file to see which users/roles have access, storing that in SQL server and running a report off of that but I am hoping there is a better way. Any input is appreciated.

谢谢.

推荐答案

如果找不到任何现成的解决方案,则可以添加Application_BeginRequest,以查找所请求页面的所需权限(最好是缓存的)在内存中以避免DB往返),然后在所需角色上执行PrincipalPermission.

If you don't find any ready-to-use solution you can add an Application_BeginRequest that looks up the required permissions for the requested page (preferrably cached in memory to avoid DB roundtrips) and then executes a PrincipalPermission on the role required.

这篇关于在SQL Server上存储ASP.Net访问规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆