What is the use of location tag in web.config file

Answers were Sorted based on User's Feedback



What is the use of location tag in web.config file..

Answer / asif ismail kunnibhavi

configuration setting is applied to specific file/folder
with appropriate "Path" attribute.
e.g
1)applying setting to everything under System.web
<location path="Administrator" >
<system.web>
<authorization>
<deny users="?" />
<allow roles="Administrator" />
<deny users="*" />
</authorization>
</system.web>
</location>

2)applying setting to specific directory called "folder1"

<!— Configuration for the "folder1" subdirectory. -->
<location path="sub1">
<system.web>
<httpHandlers>
<add verb="*" path="folder1.Scott"
type="folder1.Scott"/>
<add verb="*" path="folder1.David"
type="folder1.David"/>
</httpHandlers>
</system.web>
</location>

Is This Answer Correct ?    17 Yes 8 No

What is the use of location tag in web.config file..

Answer / ajitabh

To prevent the pages from security we use location tag

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

why we are using delegates and in which condition it is required?

3 Answers   TCS,


What is advantage of viewstate and what are benefits ?

1 Answers  


What is the difference between system.stringbuilder and system.string

0 Answers  


Why does my asp.net file have multiple tag with runat=server?

0 Answers  


What are the various types of validation controls provided by asp.net?

0 Answers  






what are configuration files?

0 Answers  


Differentiate session and cookie

1 Answers  


What are the elements of a website?

0 Answers  


When cookie will expire?

0 Answers  


Code for updating the database by entering the data into textboxes in aspx form?

2 Answers   TCS, Wipro,


Which asp.net objects encapsulate the state of the client and the browser?

0 Answers  


What is the difference between mechine.config and web.config?

0 Answers  


Categories