ASP.Net身份验证和授权 [英] ASP.Net Authentication and Authorization

查看:111
本文介绍了ASP.Net身份验证和授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我刚刚开始学习ASP.Net(VS2008),并且有两个有关身份验证和授权的问题.

我想建立一个网站,每个用户都需要使用页面右上方的链接登录.登录成功后,用户名(和注销链接)必须在网站的每个页面中可见(此处必须使用使用母版页的假定)
如何开始创建此内容.

用户分为三种:经理(完全访问权限),员工(有限访问权限)和客户端(非常有限访问权限).如何实现授权而不必每次访问三个网页(例如:管理员具有对Articles-Table的完全访问权限,而客户端仅具有读取访问权限).

Hi,

I''ve just started learning ASP.Net (VS2008) and have two questions concerning authentication and authorization.

I want to build a website where each users needs to login using a link on the top right of the page. After the login has succeeded, the username (and log off link) must be visible in each page of the website (a presume using masterpages must be used here)
How to I start creating this.

There are three kinds of users: Managers (full access), employees (limited access) and clients (very limited access). How do I implement authorization without having to make each webpage three times (ex.: A manager has full accesss to the articles-table, but a client has only read-access).

推荐答案

首先查看
Start by looking at an Introduction to Membership[^] - it includes a Role provider which allows you to classify users as you require.


引用:
ASP.NET身份验证和授权 [ ASP.NET中的表单身份验证和授权 [ ^ ]

ASP.NET中的身份验证和授权 [ ^ ]
ASP.NET中的身份验证和授权 [ ASP.NET中的身份验证和授权选项概述 [构建安全的ASP.NET应用程序:身份验证,授权和安全通信 [ ^ ]

有关 CodeProject Searqch [ ^ ]
Refer:
ASP.NET authentication and authorization[^]
Form authentication and authorization in ASP.NET[^]

Authentication and Authorization in ASP.NET[^]
Authentication and Authorization in ASP.NET[^]
An Overview of Authentication and Authorization Options in ASP.NET[^]

MSDN: Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication[^]

More on CodeProject Searqch[^]




这是示例之一

http: //www.asp.net/web-forms/tutorials/deployment/deploying-web-site-projects/users-and-roles-on-the-production-website-cs [
Hi,

This is one of the sample

http://www.asp.net/web-forms/tutorials/deployment/deploying-web-site-projects/users-and-roles-on-the-production-website-cs[^]


这篇关于ASP.Net身份验证和授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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