Click here to Skip to main content
15,896,727 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
See more:
What is windows authentication and form authentication?pls explain me with practicaly in simple way?
Posted

ASP.NET has ways to Authenticate a user:
1) Forms Authentication
2) Windows Authentication

Windows Authentication provider is the default authentication provider for ASP.NET applications. When a user using this authentication logs in to an application, the credentials are matched with the Windows domain through IIS.


There are 4 types of Windows Authentication methods:
1) Anonymous Authentication - IIS allows any user
2) Basic Authentication - A windows username and password has to be sent across the network (in plain text format, hence not very secure).
3) Digest Authentication - Same as Basic Authentication, but the credentials are encrypted. Works only on IE 5 or above
4) Integrated Windows Authentication - Relies on Kerberos technology, with strong credential encryption



Forms Authentication
- This authentication relies on code written by a developer, where credentials are matched against a database. Credentials are entered on web forms, and are matched with the database table that contains the user information.

hope it helps :)
 
Share this answer
 
Forms authentication is where the user is required to login with credentials just for the web site. Windows authentication is for when the web site will accept the user's Windows credentials for login purposes.
 
Share this answer
 
v2
Comments
ravikhoda 1-Apr-14 4:59am    
i am using window authentication but still all browser asks for the login even if the user is connected to the network/domain on intranet website. can you tell me some setting to remove authentication pop up from the browser ?
Form authentication-It is use for both intranet as well as
for internet,but window authentication is only for
intranet.In form authentication password stored in config
file but in window it stored in system database.In form
authentication we can not have roles,but In form
authentication we can define roles(like hr role where any
no of user ccan come under).
 
Share this answer
 
Comments
Philippe Mori 9-Feb-14 20:18pm    
I think you swapped Windows and form authentification in one of the 2 last statements.
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
 
Share this answer
 
Comments
CHill60 9-Feb-14 15:07pm    
If you are going to provide solutions that are copied word for word from somewhere else, please credit the original author. Copied from http://stackoverflow.com/questions/3735168/whats-the-difference-windows-authentication-passport-authentication-and-form[^]
This question is over 2 years old and already answered
Philippe Mori 9-Feb-14 20:20pm    
And by the way, also don't format it as C# code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900