How to do Forms authentication in asp.net?
Answers were Sorted based on User's Feedback
Answer / sivasaravanan
in webconfig file
<authentication mode="Forms">
<forms cookieless="UseCookies"
loginUrl="~/LoginInformation.aspx" timeout="10">
<credentials passwordFormat="Clear">
<user name="Siva" password="siva"/>
<user name="joseph" password="jos"/>
</credentials>
</forms>
</authentication>
After In a aspx.cs page you have write a below coding
if (FormsAuthentication.Authenticate(TextBox1.Text,
TextBox2.Text))
{
Response.Write("Hi Joseph");
}
else
{
Response.Write("Please Create account");
}
Is This Answer Correct ? | 6 Yes | 0 No |
I have tested the above one . Its working fine.
Is This Answer Correct ? | 3 Yes | 0 No |
what is diffrence between debug class and trace class in asp.net ?
What are the major differences between asp.net1.1 and asp.net 2.0?
8 Answers CTS, Deloitte, Mphasis, Vison,
What are the difference between overriding and overloading?
How many Garbage Collectors are there for one Application or one Page
What’s difference between “optimistic” and “pessimistic” locking?
Which object wraps the state or data of a user?
What is ViewState? What does the "EnableViewState" property do? Why would I want it on or off?
Web API supports which protocol?
Is asp.net still used?
AJAX - explain the concept and some controls like update panel, tabcontrol etc
What is the state management in asp.net?
What is application Object?