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

What is enableviewstatemac in asp net?

0 Answers  


Explain how to prepare culture-specific formatting in .net.

0 Answers  


What is the difference between <%#%> and <%=%>?

4 Answers   IBS,


What?s a bubbled event?

1 Answers  


Derive WSDL?

6 Answers   Siebel,






Which data types are supported by the RangeValidator control?

2 Answers   Siebel,


Define msil.

0 Answers  


What is strong-typing versus weak-typing?

0 Answers  


Is react a template engine?

0 Answers  


What is JIT, what are types of JITS and their purpose ?

3 Answers   Infosys,


How will you write a web service for secure socket layer? What is secure socket? Have you done any socket programming? What is single thread and multi thread? What are the differences between .NET 1.1 and .NET 2.2? What is the command to connect to a StoredProcedure? How many types of Adapters are available in ADO.NET? Why DataAdapters are important? What is DataSet? It's important to compile the ASP.NET application before using it? What protocol you use to stream the audio and Video data? What are the different kind of network protocols? Write how will you connect to a database using DataSet? Why we use AJAX? What AJAX can do which JavaScript can't do? In a page using Windows Media API, if we press a button and in succession quickly press another button, what do you think will happen? Will the application wait for the first button response and then execute the second one or directly second button command will execute. What is the architecture of your application? What is connection pooling in SQL? Tell some functions of Windows Media API? How you will detect, whether the ActiveX is installed in the system before accessing it? What are validators are available in ASP.NET? What are the basic concepts of OOPS? What is abstraction?

0 Answers   Tesco,


Define web.config in .net?

0 Answers  


Categories