简体   繁体   English

如何从ASP.NET表单身份验证转换为Windows身份验证

[英]How to convert from asp.net forms authentication to windows authentication

I've been asked to convert an asp.net application from forms authentication with roles using the aspnetdb database to use windows authentication instead. 我被要求使用aspnetdb数据库将具有角色的表单身份验证的asp.net应用程序转换为Windows身份验证。

what is required to do this? 为此需要什么? can I still use the roles defined in the app and stored in aspnetdb? 仍然可以使用在应用程序中定义并存储在aspnetdb中的角色吗?

Yes , you can use Windows Authentication for the membership provider, and SqlRoleManager for the role provider. 是的 ,您可以将Windows身份验证用于成员资格提供程序,并将SqlRoleManager用于角色提供程序。 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. 因此,您最终将获得Windows身份验证,告诉您的应用程序哪个用户正在访问该页面,并且可以在数据库中为那些Windows Auth用户设置自己的特定于应用程序的角色-这与他们在Active Directory中的角色是不同的,并且是彼此独立的。

ScottGu has a detailed explanation here . ScottGu在这里有详细的解释 ScottGU文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM