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

Is redux flux?

0 Answers  


What are skins?

1 Answers  


Uses of CLR ?

2 Answers   Mind Tree, PH Software, TCS,


How does Garbage collector(GC) works in .net

14 Answers   Accenture, HCL, Kekran Mekran, People Tech, Wipro,


What line in the following XML document will generate an error? <?xml version=?1.0?> <employees> <employee> <name>Bob Andcarrol</name> </employee> <employee> <name>Robert Burns</name> </employee> </employees> a) 6 b) 4 c) 1 d) There is no error

3 Answers   Syntax Softtech,






Which dll handles the request of .aspx page?

0 Answers  


hi guys do u know how to go one page to one page to another page plz tell me any of u know

3 Answers  


How can we call webservices in Banking Applications? and where we are using it?

0 Answers   FCG,


What is semantic gap?

0 Answers   MCN Solutions,


In a page I have gridview with options of select and delete using hyperlink when I am selecting any one of then it has to open another page how can it?

0 Answers  


What does assemblyinfo.cs file consist of?

2 Answers   Accenture, HCL,


Difference Between GridView And DataList

2 Answers  


Categories