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

What is difference between Server.Transfer and Response.Redirect in ASP.NET?

0 Answers   Sans Pareil IT Services,


How is the asp.net mvc architecture different from others? : asp.net mvc

0 Answers  


What is full form of asp.net?

0 Answers  


You create an ASP.NET application for a hotel. The application contains a page that displays current weather conditions for the city in which the hotel is located. The application calls an XML Web service every 10 minutes to update the current weather conditions. A new page is then displayed for subsequent requests. You want the same page to be cached and retrieved from the cache during the time between calls to the XML Web service. You decide to use a Page directive to accomplish this goal. Which Page directive should you use? A . <%@ Cache Seconds="600 '' VaryByParam="Page" %> B . <%@ OutputCache Time="600" %> C . <%@ OutputCache Duration="600" VaryByParam="None" %> D . <%@ OutputCache Duration="600" %>

2 Answers   Syntax Softtech,


Where is the view state data stored in asp net?

0 Answers  






Explain asp.net mvc request life cycle? : asp.net mvc

0 Answers  


what do you mean software devlopment ?

9 Answers   HCL,


what are httphandlers and httpmodules.and their differences.

1 Answers   Siemens,


Rate yourself in .net and sql database?

1 Answers   BrickRed, Infosys, Satyam, SP Software,


What r the asp.net list controls and diff. Between them?

0 Answers  


What is a postback ispostback and autopostback in asp net?

0 Answers  


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

0 Answers  


Categories