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

Give some salient points of difference between request processor and request dispatcher.

0 Answers   Tech Mahindra,


what is differences between bind and eval?

2 Answers  


What type of code (server or client) is found in a Code-Behind class?

3 Answers   Siebel Systems,


What is cross page posting in asp net?

0 Answers  


what is session ?how sessions are handeled in application? write the clauses of sql server in their order.

3 Answers   Olive Tech,


How do we sort the data from a dataset?

0 Answers  


Explain Factory pattern?

2 Answers   Microsoft,


What is WCF? Pls Explain clearly with exmple.

3 Answers   HCL, iGate,


hi i am varinder. i am very eager to learn ASP.net in C#. i am beginer to it. i have refer some books but i found it tuff to understand. their language is tuff. So please tell me the best site or best book to learn ASP.net in C#. i will be very thankful. Varinder

1 Answers  


What are the Application_Start and Session_Start subroutines used for?

5 Answers   Siebel Systems,


Describe how passport authentication works.

0 Answers  


How does a content page differ from a master page?

0 Answers  


Categories