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


Please Help Members By Posting Answers For Below Questions

How can you instantiate a tuple?

748


What is the difference between user control an custom control? Advantages/disadvantages?

751


what are connection strings?

1977


Explain the difference between vb and vb.net?

764


Explain security measures exist for .net remoting in system.runtime.remoting?

757


What is assemblies in .net?

831


What is the lapsed listener problem?

916


How do I use the thread pool?

751


What does stateless mean?

793


What is the difference between boxing and unboxing?

721


Explain me what is a design pattern and what is it for?

747


What is COM Interoperability in .NET

838


Explain the different types of proxy patterns?

901


Name the classes that are introduced in the system.numerics namespace.

825


How can you turn-on and turn-off cas?

735