具有用户访问级别的ASP.NET应用程序 [英] ASP.NET application with user accesslevel

查看:75
本文介绍了具有用户访问级别的ASP.NET应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须开发ASP.NET应用程序,其中具有不同访问级别的用户将注册到该网站。根据他们的访问级别,我想显示/隐藏他们的某些页面。



有人能告诉我如何使用ASP.NET Framework实现这一点。 ASP.NET中是否有标准方法来实现这一目标。我听说过从web.config文件设置用户角色但从未使用它。有些人可以详细说明一下。



提前谢谢

解决方案

你想要实现的东西在ASP.NET中称为角色和成员身份。请参阅以下链接并浏览每篇文章。我强烈建议你学习那里的每一个主题,因为几乎所有用户帐户的应用程序/网站都会出现这些问题。



ASP.NET登录控件概述 [ ^ ]



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



演练:管理带角色的网站用户 [ ^ ]



问候......:笑:


你应该阅读以下很棒的文章。



1. ASP.NET身份验证和授权 [ ^ ]。

2. 了解ASP.NET角色和成员资格 - 初学者教程 [ ^ ]。

3. ASP.NET 2.0成员资格,角色,表单身份验证和安全资源 [ ^ ]。

4. [MSDN]会员资格 [ ^ ]

I have to development ASP.NET application where users with different access - levels will signup to the website. Based upon their access - level I would like to SHOW/HIDE certain pages from them.

Could someone tell me how could I achieve this using ASP.NET Framework. Is there a STANDARD WAY in ASP.NET to achieve this. I have heard something like setting user roles from web.config file but never used it. Could some elaborate a std way.

Thanks in advance

解决方案

The thing you are trying to implement is called roles and membership in ASP.NET. Refer to below links and go through each article. I strongly suggest you to learn each and every topic there because these concpets will be requiered in almost all the apps/websites where User Account comes into picture.

ASP.NET Login Controls Overview[^]

How to: Implement Simple Forms Authentication[^]

Walkthrough: Managing Web Site Users with Roles[^]

Regards.. :laugh:


You should go through the below awesome articles.

1. ASP.NET authentication and authorization[^].
2. Understanding ASP.NET Roles and Membership - A Beginner's Tutorial[^].
3. ASP.NET 2.0 Membership, Roles, Forms Authentication, and Security Resources[^].
4. [MSDN] Introduction to Membership[^]


这篇关于具有用户访问级别的ASP.NET应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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