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 |
How many ways are there to maintain a state in .net? What is view state?
Explain how can we inherit a static member?
What is the difference between web.config and machine.config in ASP.NET?
Is it true that a Web service must be written in .NET or not?
Can we Run the Application without Build
How long do session variables last?
How Session outproc in Sqlserver stored?
what is clr . how we access them?
Types of authentications in ASP.NET ?
9 Answers Accenture, Roland, Shriram,
If there is submit button in a from tell us the sequence what happens if submit is clicked and in form action is specified as some other page ?
What is mvc in angular?
Explain the asp.net page life cycle.
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)