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 |
Do you know about caching with the datasource controls?
suppose i am Admin in my application and i have to terminate the session of the particular user in my application.........how can i do it....?????
difference between writing connection string in web.config through connection string and appsettings
Difference between dynamic query and static query ?
What is the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc
how to debug web services on consumer side?
What is Runtime callable wrapper?
How to kill more than one session variables at a time
What are validator? Name the Validation controls in asp.net? How do u disable them?
What are html helpers in asp.net?
What is the difference between User Controls and Master Pages
22 Answers Deloitte, IBM, IntraLogic, Markit, TCS,
What is the difference between application and cache variables?
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)