How to do Forms authentication in asp.net?

Answers were Sorted based on User's Feedback



How to do Forms authentication in asp.net?..

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

How to do Forms authentication in asp.net?..

Answer / tiger skumar

I have tested the above one . Its working fine.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What would be salary for 6+ years of experience in ASP.NET in different metro city in india?

4 Answers  


What is http pipeline in asp.net?

0 Answers  


Apart from IDE what are the enhancements in asp.net 2.0?

0 Answers   Microsoft,


What are the various session state management options provided by asp.net?

0 Answers  


What kind of data can be stored in viewstate?

0 Answers  






How does output caching work in ASP.NET?

0 Answers  


how to update data using store procedure

1 Answers  


What is session tracking & methods?

4 Answers   C Squared Systems,


what is wpf and wcf in .net explain with an example?

2 Answers  


Explain the difference between Web Garden and Web Farm?

0 Answers   Sans Pareil IT Services,


If I update session state, should I lock it, too? Are concurrent accesses by multiple requests executing on multiple threads a concern with session state?

1 Answers  


How many types of validation controls are provided by ASP.NET?

8 Answers  


Categories