I am doing a website and I would like know whether the build in asp.net Forms Authentication is the recommended authentication to be used when developing asp.net websites with login system?
Depends on whether you want to have Rapid application development for your websites/web applications. you can go for it because you can also customize most of the modules/templates from stackoverflow.
Forms authentication enables user and password validation for Web applications that do not require Windows authentication. With forms authentication, user information is stored in an external data source, such as a Membership database, or in the configuration
file for an application. Once a user is authenticated, forms authentication maintains an authentication ticket in a cookie or in the URL so that an authenticated user does not need to supply credentials with each request.
If you look at the class definition for FormsAuthentication, you'll see an
Authenticate method. The documentation says "Validates a user name and password against credentials stored in the configuration file for an application."
You don't want to use this because you want to store users and passwords in a database, not the config file. This is the ONLY method related to passwords in the whole FormsAuthentication class.
The correct way to issue a forms ticket is with the SetAuthCookie method, which
does not take a password. So how/where do you check the password?
The ASP.NET version 2.0 membership feature provides secure credential storage for application users. It also provides a membership API that simplifies the task of validating user credentials when used with forms authentication. Membership providers abstract
the underlying store used to maintain user credentials.
After you're done reading that, you're probably going to wonder if you should write your own custom Membership provider. You might want to take a look at some of the answers here on SO for guidance on that
stackoverflow or start a new question when that comes up.
I do understand that the FormsAuthentication was design so that the developer does not have to spend time designing a custom login system with a custom user database.
Sounds to me that the build-in FormsAuthentication system is the right best login system for small website projects!..
I do understand that the FormsAuthentication was design so that the developer does not have to spend time designing a custom login system with a custom user database.
Sounds to me that the build-in FormsAuthentication system is the right best login system for small website projects!..
Sounds to me that the build-in FormsAuthentication system is the right best login system for small website projects
Hello,
Yeah, I pretty much agree. But as the above user said, it really depends. But again, yes, built in FormsAuthentication would be enough for most of the applications (Even for big projects, not only for small websites). If the functionality it provides is
enough for what you are going to implement, you can go ahead and use it.
idsantos
Member
1 Points
3 Posts
using asp.net Forms Authntication?
Jul 03, 2012 12:13 PM|LINK
I am doing a website and I would like know whether the build in asp.net Forms Authentication is the recommended authentication to be used when developing asp.net websites with login system?
shabirhakim1
Star
13528 Points
2151 Posts
Re: using asp.net Forms Authntication?
Jul 03, 2012 12:19 PM|LINK
Depends on whether you want to have Rapid application development for your websites/web applications. you can go for it because you can also customize most of the modules/templates from stackoverflow.
From the documentation for the FormsAuthentication class:
If you look at the class definition for FormsAuthentication, you'll see an Authenticate method. The documentation says "Validates a user name and password against credentials stored in the configuration file for an application." You don't want to use this because you want to store users and passwords in a database, not the config file. This is the ONLY method related to passwords in the whole FormsAuthentication class.
The correct way to issue a forms ticket is with the SetAuthCookie method, which does not take a password. So how/where do you check the password?
Answer: Membership (or something custom).
Membership is a large topic and you really need to spend some time researching it and writing a test application. I'd read at least the first three articles in the Multipart Series on ASP.NET's Membership, Roles, and Profile.
After you're done reading that, you're probably going to wonder if you should write your own custom Membership provider. You might want to take a look at some of the answers here on SO for guidance on that stackoverflow or start a new question when that comes up.
idsantos
Member
1 Points
3 Posts
Re: using asp.net Forms Authntication?
Jul 03, 2012 12:31 PM|LINK
I do understand that the FormsAuthentication was design so that the developer does not have to spend time designing a custom login system with a custom user database.
Sounds to me that the build-in FormsAuthentication system is the right best login system for small website projects!..
shabirhakim1
Star
13528 Points
2151 Posts
Re: using asp.net Forms Authntication?
Jul 03, 2012 12:40 PM|LINK
Can't say.
BrockAllen
All-Star
28052 Points
4996 Posts
MVP
Re: using asp.net Forms Authntication?
Jul 03, 2012 01:47 PM|LINK
Just so you're clear, Membership is not the same as Forms Authentication.
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/
Ruchira
All-Star
44216 Points
7184 Posts
MVP
Re: using asp.net Forms Authntication?
Jul 03, 2012 03:25 PM|LINK
Hello,
Yeah, I pretty much agree. But as the above user said, it really depends. But again, yes, built in FormsAuthentication would be enough for most of the applications (Even for big projects, not only for small websites). If the functionality it provides is enough for what you are going to implement, you can go ahead and use it.
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.idsantos
Member
1 Points
3 Posts
Re: using asp.net Forms Authntication?
Jul 05, 2012 08:18 PM|LINK
I thank you all for your help, I am going to use The FormsAuthentication / Membership framework for my small website project.