0

I have a requirement to develop an asp.net web forms application that supports a two ways of authentication methods, at first windows authentication (Active Directory) and a regular user authentication (I think its called application level authentication or web forms authentication).

The Active Directory will be located in a local network of application's server.

At first the application will check if user is located inside Active Directory (If not) then it will go back and check the database for application level authentication.

Is it possible to develop an application with asp.net identity with two way authentication methods that checks if the user is windows authenticated or falls back to application level authentication? If yes please provide me with an example or a tutorial or something to Google =D.

from my search I found a couple of questions that didn't get answered or I didn't understand:


ASP.Net Identity - Multiple Authentication Methods

this is the closest question to mine:

Is it possible to configure the new ASP.Net Identity system to support multiple authentication methods?

Answer:

Add a project for each type of authentication.

is this a good approch? is it possible to do? how should it look like? many layers of business layer?!


How to allow multiple authentication methods in ASP.NET?

actually this is the answer that I didn't quiet understand, would someone explain to my the answer in a simpler way I'd appreciate that.


Different way of authenfication in ASP.Net

I found this question while writing mine, one of the answers is

... custom MembershipProvider ....

should I use this? Is it different from Identity?

I know that membership is an old technology that got replaced by Identity and I shouldn't use it any more.


this is a picture I hope it explains my point a bit simpler

this is what I'm trying to do

Many thanks in advance and I'm sorry for my bad English.


UPDATE:

The scenario will be:

User opens login page then enters username and password, then the application will check Active Directory server if he's not in the active directory will check with database of users.

so for the user its a single page NOT a separate pages.

Community
  • 1
  • 1
iYazee6
  • 826
  • 12
  • 22
  • What you need has nothing to do with ASP.NET Identity. Google for "mixing forms and windows authentication". Check this for example, http://beensoft.blogspot.com/2008/06/mixing-forms-and-windows-authentication.html – Wiktor Zychla Dec 16 '14 at 08:03
  • @WiktorZychla thank you for answering my question, but the user will enter his username and password, then the system will check if he's in the AD if not will check database of users, for the user its a single page, so sorry that you understood my objective this way, I'll try to update my question. – iYazee6 Dec 16 '14 at 11:26
  • you have used the term "windows authentication" in a wrong context. This is why your question is confusing. Windows authentication is the 401 Challenge based authentication that doesn't involve providing any username/password. What you need then is a custom membership provider or a custom identity 2.0 user provider. Your custom provider should first check the AD and then, if fails, check the database. And last thing, I am not answering, I just provide comments. Your question was too vague to provide actual answer. That is why I comment, to get some feedback from you. – Wiktor Zychla Dec 16 '14 at 12:59

0 Answers0