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
Explain how to redirect tracing to a file?
What are the new thee features of com+ services, which are not there in com (mts)?
Can a try block have nested try blocks?
What is the difference between function and stored procedure?
Explain the difference between managed and unmanaged code?
What is COM Interoperability in .NET
Compare & contrast rich client (smart clients or windows-based) & browser-based web application
Explain what is a delegate?
Explain the procedure to add assemly to gac to make it shared one?
What is misl?
What is the difference between response.redirect & server.transfer?
What should you do to store an object in a viewstate?
Explain what is heap and what is stack?
What is a manifest in .net?
What's typical about a windows process in regards to memory allocation in .net?