How to authenticate users using web.config ?



How to authenticate users using web.config ?..

Answer / alb.shah

if we are using form based authentication at that time in
the web.config
we can set the autentication mode to "form"

then we can specify the user name and password which we are
going to access.
if any one can access that application then you can specify
<allow users="*">
inside the authentication tags

<authentication mode="Forms">
<forms name="appNameAuth" path="/"
loginUrl="login.aspx" protection="All" timeout="30">
<credentials passwordFormat="Clear">
<user name="jeff" password="test" />
<user name="mike" password="test" />
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

Life cycle of ASP.NET page when a request is made ?

4 Answers   MMTS,


In a Repeater control how one can provide an alternating color scheme ?

0 Answers   Siebel,


what are the State management and Its Uses

2 Answers  


Can you dynamically assign a Master Page?

0 Answers   MCN Solutions,


If i have 1000 records in dataset, how to do paging?

2 Answers   Mind Tree,






What are the ways of preserving data on a Web Form in ASP.NET?

0 Answers  


Describe Segmentation With Paging?

0 Answers   MaxSolPro,


What are the major differences between asp.net1.1 and asp.net 2.0?

8 Answers   CTS, Deloitte, Mphasis, Vison,


Briefly describe different techniques for ASP.NET State Management?

6 Answers   Deloitte, Syntax Softtech,


which directive is mandatory in page control

3 Answers   AG Technologies,


What's the difference between viewstate and sessionstate?

0 Answers  


What is the other method, other than GET and POST, in ASP.NET?

3 Answers  


Categories