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

Explain how is a property designated as read-only?

0 Answers  


Define application state variable and session state variable?

0 Answers   UGC Corporation,


what is aspcompat? what it does?

1 Answers  


what are types of viewstate

1 Answers  


Define WCF ABC , Diffrent Contract. Diff b/w Wcf and in webservice

2 Answers   Syntel,






In order to get assembly info which namespace we should import?

0 Answers  


hi .net gurus here is my question " how does impersonate in asp.net works? explain with good example"

2 Answers   PennyWise, TCS, Wipro,


What are the benefits of view state?

0 Answers  


What are the different types of validation controls in asp.net?

0 Answers  


How does output caching work in ASP.NET?

0 Answers  


What are early binding and late binding.

0 Answers  


4. How do you plan to achieve these goals?

7 Answers   Burger King, Latest, Swatz Oils,


Categories