如何从 asp.net forms 身份验证转换为 windows 身份验证

发布于 2024-09-18 23:44:51 字数 121 浏览 1 评论 0原文

我被要求将 asp.net 应用程序从表单身份验证与使用 aspnetdb 数据库的角色转换为使用 Windows 身份验证。

这样做需要什么?我仍然可以使用应用程序中定义并存储在 aspnetdb 中的角色吗?

I've been asked to convert an asp.net application from forms authentication with roles using the aspnetdb database to use windows authentication instead.

what is required to do this? can I still use the roles defined in the app and stored in aspnetdb?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

愛放△進行李 2024-09-25 23:44:51

,您可以对成员资格提供程序使用 Windows 身份验证,对角色提供程序使用 SqlRoleManager。因此,您最终会通过 Windows 身份验证告诉您的应用程序哪些用户正在访问该页面,并且您可以在数据库中为这些 Windows 身份验证用户设置自己的特定于应用程序的角色 - 这与他们在 Active Directory 中拥有的任何角色不同且独立。

ScottGu 这里有详细的解释
ScottGU 文章

Yes, you can use Windows Authentication for the membership provider, and SqlRoleManager for the role provider. So you end up with Windows Authentication telling your app what user is accessing the page, and you can setup your own application-specific roles in your database for those Windows Auth users -- which is distinct and separate from whatever roles they have in Active Directory.

ScottGu has a detailed explanation here.
ScottGU article

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文