的MembershipProvider,IPrincipal的,IIdentity的? [英] MembershipProvider, IPrincipal, IIdentity?

查看:142
本文介绍了的MembershipProvider,IPrincipal的,IIdentity的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个概念性的问题...我想提出一个公司的Intranet应用(网络平台)。我与这些表的SQL Server数据库:

I have a conceptual question... I am making an Intranet application (Web platform) for a company. I have a SQL Server DB with these tables:

Users (userID, userName, userPass, roleID)
Roles (roleID, roleName)
Pages (pageID, pageURL)
RolesXPages(pageID, roleID)

如何创建一个结构来存储所有信息,而用户浏览的网站,我的意思是,线程上,我应该能够检查他的角色,他的网页(那些他可以访问),我有最好的方法在读书,并有很多东西,其中有林困惑,我看到的MembershipProvider,IPrincipal的,的IIdentity等类,但林不知道应该是我最好的一个。

How is the best way to create a structure to store all this information while the user navigates the site, I mean, on the thread I should be able to check his role, his pages (the ones he can access) I have been reading and there is a lot of stuff there where Im confused, I saw the MembershipProvider, IPrincipal, IIdentity, etc classes but Im not sure what should be the best one for me.

有什么想法......

Any thoughts...

在此先感谢!

编辑:
每次变得更加扑朔迷离......我只是想处理这些结构在运行时能够在页面回调或更改页面十个分量的状态...

Everytime gets more confusing... I just want to handle those structures at runtime and be able to mantain state during page callbacks or changing pages...

推荐答案

我一般用的MembershipProvider,RoleProvider和ProfileProvider。这听起来像它会解决你所有的问题。

I generally use MembershipProvider, RoleProvider and ProfileProvider. It sounds like it would solve all of your problems.

http://www.4guysfromrolla.com/articles/120705-1.aspx

本的MembershipProvider允许您使用一些内置的像登录,loginstatus,userwizard asp.net控制。

The MembershipProvider allows you to use a number of built in asp.net controls like login, loginstatus, userwizard.

在RoleProvider,您可以创建并管理用户的成员在其中的角色和可以使用的web.config管理对不同应用领域的访问

The RoleProvider allows you to create and manage which membership users are in which roles and you can manage access to different areas of your application using web.config

该ProfileProvider允许你基本上扩展会员用户占,加入希望他们的帐户的任何属性。

The ProfileProvider allows you to basically extend the Membership users account to add whatever properties you wish to their account.

这篇关于的MembershipProvider,IPrincipal的,IIdentity的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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