How to do Forms authentication in asp.net?
Answers were Sorted based on User's Feedback
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 |
I have tested the above one . Its working fine.
| Is This Answer Correct ? | 3 Yes | 0 No |
Can we override the enablepartialrendering property of the scriptmanager class?
What is the difference between Server.Transfer and Response.Redirect?
What is the main function of url routing system in asp.net mvc? : asp.net mvc
How to Insert/Add in ASPXgridview
How to use multiple scriptmanager controls in a web page?
What is reflection and disadvantages of reflection?
Breifly explain about stack and heap memory Managemet?
Can session variables be accessed from code-behind?
What is session id in web application?
How long should a session id be?
Explain how can we inherit a static variable?
What is asp.net web application?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)