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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give me one example of Web API Routing?

796


How does asp.net work?

729


What are the difference between function and stored procedure in .net programming language?

454


How will you load dynamic assembly?

742


Define xmlvalidatingreader class.

793


How many ways are there to maintain a state in .net? What is view state?

787


Why do we use datasource in asp.net?

704


Explain an object, class and method.

731


6. Tell us about a time when you failed to meet a deadline. What were the repercussions?

1937


What is globalization and localization in asp net?

696


How to implement Authentication and Authorization?

761


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

783


What permissions do asp.net applications posses by default?

824


Which object is used to encapsulate the state of the client and the browser in ASP.NET?

794


What is web api vs wcf?

778