正在支持活动目录中的Web应用程序很难在目前建立与窗体身份验证?很难、窗体、应用程序、身份验证

2023-09-09 21:44:36 作者:学会坚强i

我目前只支持asp.net窗体身份验证的Web应用程序。

I have a web application that currently only supports asp.net forms authentication.

我的用户的业务逻辑目前是这样的:

My user business logic currently is like:

Users.GetUserByID(用户ID); Users.LoginUser(用户名,密码);

Users.GetUserByID(userID); Users.LoginUser(username, password);

即。这是pretty的模块,我希望支持活动目录不会很困难。

i.e. it is pretty modular and I hope supporting active directory won't be difficult.

是否有可能对我来说,同时支持AD和形式?如果是的话,我该怎么办,只需插入的人谁签署为使用AD首次新用户?

Is it possible for me to support both AD and forms? If yes, what do I do, simply insert a new user for someone who signs into using AD for the first time?

推荐答案

默认提供的AD是窗口集成身份验证,这不能混用和匹配与窗体身份验证。然而,如果你决定要实现自定义的供应商,那么你就可以保持你的业务逻辑。你将不得不写AD集成code。是的,使用API​​的AD可以自动添加用户,如果你想。

The default provider for AD is "windows integrate authentication" and this cannot mix-and-match with forms auth. However if you decide to implement a custom provider, then you can maintain your business logic. You will have to write AD integration code. And yes, using the API for AD you can automatically add users, if you wish.