在c#中创建自定义权限 [英] Create Custom Permission in c#

查看:84
本文介绍了在c#中创建自定义权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#中有一个项目,我需要设计自定义权限用户,

这个网站有许多不同的模块,我需要检查用户是否有权限模块本身,如果有的话,用户有什么权限(读/写/删除)。

已经有数据结构(用户,证书,组)问题是在页面本身实现凭证,

我的意思是,在收到用户的凭证后,我实际上是如何使用相应的凭证再次创建页面

I have a project in C # for which I need to design Custom Permission כםר users,
This web site has a number of different modules and I need to check whether the user has authorization for the module itself and if so what permission (read / write / delete) the user has.
already have The data structure (users, certificates, groups) the problem is implementing the credentials in the page itself,
I mean, how, after having received the credentials of the user I''m actually creating the page again with the appropriate credentials

推荐答案

如果您使用会员资格 [ ^ ],然后这可以处理得很漂亮使用角色 [ ^ ]
If you are using Membership[^], then this can be handled pretty easily by using Roles[^]


在web.config中



使用身份验证和授权



在visual studio中使用会员提供程序
in web.config

use authentication & authorization

use membership provider in visual studio


这篇关于在c#中创建自定义权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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