Web.Config (location path=)Question

  • Thread starter Patrick Olurotimi Ige
  • Start date
P

Patrick Olurotimi Ige

I have a Virtual directory FORUMS and the a folder CORP under that
Directory.
And i want to add a location path to this folder in web.config but after
trying the below code it doesn't seem to WORK!!


Am i missing something ??

<location path="/Forums/CORP">
<system.web>
<customErrors mode="Off" />
<authorization>
<allow roles="Corp_Manag/>
<deny users="?" />
<authorization>
</system.web>
</location>

I THINK MAYBE I'M NOT PUTTING THE ABOVE CODE IN THE RIGHT PLACE BECOS
I'M INCLUDING IT IN THE DEFAULT WEB.CONFIG GENERATED BY VSTUDIO.NET
 
P

Patrick Olurotimi Ige

Matt i placed it in the Directory folder!
I got it working but i noticed can't use:-
<location path="/Forums/CORP">
It has to be a FOLDER name or a file name only
for example <location path="Forums"> or just use
<location path="Forums.aspx">
Any other ideas?
 
B

Brock Allen

<location> must be inside the <configuration> element -- make sure you have
that in the web.config that's in the child directory.
 
G

grchuah

You should place your 'location path' tag at the root of the main folder
web config file. Right after the web.config's </system.web> tag.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top