473,386 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Web.Config (location path=)Question

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

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
4 14277
Where are you placing this in the Web.Config?

MattC
"Patrick Olurotimi Ige" <na********@hotmail.com> wrote in message
news:Oe**************@TK2MSFTNGP14.phx.gbl...
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

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #2
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?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #3
<location> must be inside the <configuration> element -- make sure you have
that in the web.config that's in the child directory.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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

*** Sent via Developersdex http://www.developersdex.com ***


Nov 19 '05 #4

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

and notice ur <allow roles="Corp_Manag/is without the closing
quotation mark.
<location path="/Forums/CORP">
<system.web>
<customErrors mode="Off" />
<authorization>
<allow roles="Corp_Manag/>
<deny users="?" />
<authorization>
</system.web>
</location>


--
grchuah
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 5 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Stijn Goris | last post by:
Hi all, I have a question regarding the header function. I send a browser to a certain page (eg first.php ) wich sends no output to the browser. This page sends the browser to another page (eg...
1
by: solutions | last post by:
Hi, Here is my relevant code for an arbitrary page (let's call it PAGE_B): <body onload="window.location.hash='anchor';"> With this code, if the user goes from PAGE_A to PAGE_B, he will jump...
9
by: Grant Edwards | last post by:
I have several python apps (some wxPython, some plain text-mode stuff) that I distribute internally for installation on Win32 machines. They're bundled/installed using py2exe and inno setup. I...
1
by: Shark Bait | last post by:
Hi, I have a web site that I am creating locally on my workstation's "C" drive. I have a reference in my web.config to a resource file (it contains global keys) using "\" as the root. Everything...
3
by: Diarmuid | last post by:
How would I get the path of my program? Thanks Diarmuid
6
by: G*rd*n | last post by:
I have been using the HTTP "Location" reponse header to direct a symbolic request to a CGI program to an actual URL/file. For example, let us suppose the CGI program's table indicates xyz ->...
26
by: Jan Engelhardt | last post by:
Hello, assume foo/bar.h exists, and is included as '#include "bar.h"' in foo/bar.c. `gcc -c foo/bar.c` will compile it fine (i.e. finds the file). Is this a gcc extension or a C compiler...
2
by: Jeff | last post by:
I'm very new to javascript and need only a small amount in an asp.net application I'm working on. I apologize if I'm not using the correct terminology to describe the problem. I got the code below...
5
by: akirekab | last post by:
Can this be saved somehow in a field in the database along with some other address criteria, so I can always be looking at the current location. like this? ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.