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

Name the two properties are on every validation control?

0 Answers  


What are session variables?

2 Answers   Microsoft,


What methods are fired during the page load?

7 Answers   InSync Tech-Fin, Siebel Systems, Visual Soft,


What is the use of web.config? Difference between machine.config and Web.config?

5 Answers  


What is the difference between response.redirect and server.transfer, how to choose one among the other?

3 Answers   247Customer,






How do you insert multiple rows from a grid view to database table under a single transaction?

1 Answers  


Explain the differences between Server-side and Client-side code?

3 Answers  


How to refresh a page in asp.net

4 Answers  


What is http protocol and how it works?

0 Answers  


Explain the asp.net mvc folder conventions? : asp.net mvc

0 Answers  


Differentiate between file-based dependency and key-based dependency.

0 Answers  


How do you do client-side validation in .net? How to disable validator control by client side javascript?

0 Answers  


Categories