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 is diffrence between debug class and trace class in asp.net ?

2 Answers  


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?

0 Answers  


How many Garbage Collectors are there for one Application or one Page

1 Answers   Emphasis,


What’s difference between “optimistic” and “pessimistic” locking?

0 Answers  


Which object wraps the state or data of a user?

0 Answers  


What is ViewState? What does the "EnableViewState" property do? Why would I want it on or off?

0 Answers  


Web API supports which protocol?

0 Answers  


Is asp.net still used?

0 Answers  


AJAX - explain the concept and some controls like update panel, tabcontrol etc

2 Answers   Syntel,


What is the state management in asp.net?

0 Answers  


What is application Object?

0 Answers   Infogain,


Categories