diff between forms authentication and windows
authentication?
Answer Posted / pankaj lohani
web.config file
The web.config file is an XML based configuration file which
exists for every web application. The web.config file
typical resides in the application root directory although
it is possible to have multiple web.config files. If there
is another web.config file placed in a directory below the
application root, it will use those setting instead. The
web.config file is where you will tell a web application to
use either of the three types of autentication types.
Here we show you a basic example of what a web.config file
looks like when it has be set to use form authentication. I
will go in further detail and explain the tags.
<configuration>
<system.web>
<authentication mode="Forms">
<forms loginUrl="login.aspx" protection="All"
timeout="30">
<credentials passwordFormat="Clear">
<user name="devhood" password="password"/>
<user name="someguy" password="password"/>
</credentials>
</forms>
</authentication>
<authorization>
<allow users="*" />
</authorization>
</system.web>
<location path="admin/">
<system.web>
<authorization>
<allow users="devhood" />
<deny users="someguy" />
</authorization>
</system.web>
</location>
<location path="usersonly/">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<location path="public/">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>
The first tag in the web.config file is the <configuration>
tag. It is the base tag for the web.config file and will
contain all your configuration settings in here. The first
<system.web> tag specifies the settings that will apply to
all the file in the same directory and the files below this
directory.
Is This Answer Correct ? | 17 Yes | 12 No |
Post New Answer View All Answers
How can you instantiate a tuple?
What is the difference between user control an custom control? Advantages/disadvantages?
what are connection strings?
Explain the difference between vb and vb.net?
Explain security measures exist for .net remoting in system.runtime.remoting?
What is assemblies in .net?
What is the lapsed listener problem?
How do I use the thread pool?
What does stateless mean?
What is the difference between boxing and unboxing?
Explain me what is a design pattern and what is it for?
What is COM Interoperability in .NET
Explain the different types of proxy patterns?
Name the classes that are introduced in the system.numerics namespace.
How can you turn-on and turn-off cas?