ASP.NET角色与Windows验证 [英] ASP.NET Roles with Windows Auth

查看:119
本文介绍了ASP.NET角色与Windows验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从ASP福利局超级简单的问题:我有一个仅供内部使用的ASP.NET网站我正在使用Windows集成的全线权威性。基本上有三种角色,我希望与该网站关联:用户,经理和管理员。该网站是开放给整个组织,那么,谁是谁认证是一个用户,除非它们是经理或管理员。

Super simple question from an ASP newb: I've got an internal-only ASP.NET website I'm working on that uses Windows integrated auth across the board. There are essentially three roles I want to associate with the site: user, manager, and admin. The site is open to the entire org, so anyone who is authenticated is a user, unless they are a manager or an admin.

管理员和经理的名单需要在数据库中,而不是在web.config中。角色信息为这个网站是不是在什么可以从用户的配置文件AD学到任何关系。

The list of admins and managers needs to be in a database, not in the web.config. The role information for this site is not in any way associated with what can be learned from a user's AD profile.

我已经快拿起ASP.NET pretty,我绝对有能力研究正确的解决办法,但我希望有人能在这里开始我下了正确的道路。什么是完成这件事的最佳方法?我想这涉及到使用上的集成身份验证顶部的角色提供,但在此之前我开始研究一万美元的期权,并可能选错了一个,我想我会在这里问。

I've been picking up ASP.NET pretty quickly and I'm definitely capable of researching the correct solution, but I was hoping someone could start me down the right road here. What's the best way to get this done? I imagine it involves using a role provider on top of the integrated auth, but before I started researching a million options and possibly picked the wrong one, I thought I'd ask here.

谢谢!

推荐答案

我不得不这样做,这也和我以前从斯科特Guthrie的以下博客条目让我去......

I had to do this also and I used the below blog entry from Scott Guthrie to get me going....

<一个href=\"http://weblogs.asp.net/scottgu/pages/Recipe%5F3A00%5F-Implementing-Role%5F2D00%5FBased-Security-with-ASP.NET-2.0-using-Windows-Authentication-and-SQL-Server.aspx\" rel=\"nofollow\">http://weblogs.asp.net/scottgu/pages/Recipe%5F3A00%5F-Implementing-Role%5F2D00%5FBased-Security-with-ASP.NET-2.0-using-Windows-Authentication-and-SQL-Server.aspx

我伟大的工作。

我没有创建一个新的供应商或任何东西。斯科特的博客文章勾画出来很好。虽然这是一个相当技巧,但让我去迅速,并获得成功。

I didn't create a new provider or anything. Scott's blog post lays it out nicely. Although it is quite a hack but got me going quickly and did the trick.

使用这一招可以使用Windows身份验证与基于DB角色。

With this trick you can use windows auth with DB based roles.

这篇关于ASP.NET角色与Windows验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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