如何在asp.net中实现表单身份验证安全性? [英] How To Implement Form authentication Security in asp.net?

查看:97
本文介绍了如何在asp.net中实现表单身份验证安全性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有数据库中的员工和部门,应该登录3种类型的用户



first> admin可以为部门和员工添加更新和删除记录并分配离职经理



秒>离职经理可以查看员工的部门数据



third>员工只需查看自己的数据



如何使用表单身份验证来执行此操作

i have employee and department in database and 3 types of users should be logged in

first>admin can add update and delete records for departments and employees and assign depart manager

second> depart managers can view employee''s data of their departments

third> employees just view their own data

how to use forms authentication to do this

推荐答案

首先,实现成员资格: http://msdn.microsoft.com/en-GB/library /yh26yfzy(v=vs.100).aspx [ ^ ] - 它包含角色,允许您决定谁有权访问哪些内容,还允许您限制哪些页面可供哪些角色的用户使用。
Firstly, implement Membership: http://msdn.microsoft.com/en-GB/library/yh26yfzy(v=vs.100).aspx[^] - it incorporates Roles, which allow you to decide who has access to what, and also allows you to restrict what pages are available to users in which role.


看看这些:

如何:实现简单表单身份验证 [ ^ ]

解释:ASP.NET 2.0中的表单身份验证 [ ^ ]

在ASP.NET中使用表单身份验证 - 第1部分 [ ^ ]



检查正确的配置设置和实现。
Have a look at these:
How to: Implement Simple Forms Authentication[^]
Explained: Forms Authentication in ASP.NET 2.0[^]
Using Forms Authentication in ASP.NET - Part 1[^]

Check for correct config setting and implementation.


这篇关于如何在asp.net中实现表单身份验证安全性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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