views:

172

answers:

3

Just going to start making a web application and was wondering which was better, or at least what are the main differences between them (as it probably matters what I am using them for)?

  • Windows Authentication
  • Passport Authentication
  • Form Authentication
+8  A: 

I would say it greatly depends on what your web app will be doing, as each one has its place. Here is some brief details about each one.

Windows authentication enables you to identify users without creating a custom page. Credentials are stored in the Web server s local user database or an Active Directory domain. Once identified you can use the user s credentials to gain access to resources that are protected by Windows authorization.

Forms authentication enables you to identify users with a custom database such as an ASP.NET membership database. Alternatively you can implement your own custom database. Once authenticated you can reference the roles the user is in to restrict access to portions of your Web site.

Passport authentication relies on a centralized service provided by Microsoft. Passport authentication identifies a user with using his or her e-mail address and a password and a single Passport account can be used with many different Web sites. Passport authentication is primarily used for public Web sites with thousands of users.

Anonymous authentication does not require the user to provide credentials.

http://msdn.microsoft.com/en-us/library/eeyk640h.aspx - ASP.NET Authentication further details on forms and window authentication

Edit Rushyo link is better: http://msdn.microsoft.com/en-us/library/ee817643.aspx

Spooks
+1  A: 

This should cover everything you're looking for (and more):

http://msdn.microsoft.com/en-us/library/ee817643.aspx

[Snap - I was totally going to use that exact same quote as well ;)]

Rushyo
+1  A: 

Situation as when you can use what :

Windows Authentication : As you will be using the login & password used in a domain... If you use windows authentication, your webapp will (generally) have to be deployed in a network server and all your users should (generally) have a login created for them in the domain. Though cross domain operations are possible, primarily you wont be able to use it in non-domain based environment like public websites. It will be tough if you want to include some users who are outside your domain.

Forms Authentication : Here you are deciding to act independently. You will assign each user a separate userId and password and will manage them yourself. The overhead here is you should provide and restrict the ways users are created and removed. Here you are not restricted to any domain. For any user to gain access to your webapp should get registered with your webapp. This is similar to any mail sites you see on internet.

Passport Authentication : You are depending on MS to validate your users. This will give you a global status to your application, but if you are going to deploy it only to a small group of users, you will be forcing them to create a passport account (if they don't have) so that they can access your application.

To make it more clear.. Whichever method you follow You can still restrict who can access your webapp, and can also define your own roles for each users.

The King