473,698 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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" />
<authorizatio n>
<allow roles="Corp_Man ag/>
<deny users="?" />
<authorizatio n>
</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 14295
Where are you placing this in the Web.Config?

MattC
"Patrick Olurotimi Ige" <na********@hot mail.com> wrote in message
news:Oe******** ******@TK2MSFTN GP14.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" />
<authorizatio n>
<allow roles="Corp_Man ag/>
<deny users="?" />
<authorizatio n>
</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.as px">
Any other ideas?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #3
<location> must be inside the <configuratio n> 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" />
<authorizatio n>
<allow roles="Corp_Man ag/>
<deny users="?" />
<authorizatio n>
</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_Man ag/is without the closing
quotation mark.
<location path="/Forums/CORP">
<system.web>
<customErrors mode="Off" />
<authorizatio n>
<allow roles="Corp_Man ag/>
<deny users="?" />
<authorizatio n>
</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
4438
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 second.php) with the header("Location:") function. second.php doesn't either send any output to the browser. The browser is then send to another page also with the header() function. Now my problem: I have to send user and password data...
1
2581
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 to PAGE_B#anchor after PAGE_B has fully loaded. BUT... if he clicks the back button, instead of returning to PAGE_A (which is what I want), he will return to PAGE_B (without the anchor).
9
2128
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 followed what I think is the normal procedure of installing each app in its own directory under /Program Files/<vendor>/<app>. The problem is that the apps only run if they're started with
1
2844
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 works fine. When I move it to a test server the mapping to the file no longer works unless I include the drive letter "D". I don't have to reference the drive letter on my workstation why would I have to do it on test? I thought "\" meant: "The root...
3
867
by: Diarmuid | last post by:
How would I get the path of my program? Thanks Diarmuid
6
2883
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 -> /this/that/the.other.thing.html, then redirect.cgi?xyz results in the page /this/that... being sent. redirect.cgi is usually in another directory than the page it is to supply. This works fine as far as it goes. A problem arises when the actual...
26
2651
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 standard feature that foo/ will be searched without explicitly passing -Ifoo? $ cat foo/bar.h #define GOAL 1
2
8765
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 to work under most conditions to capture the client's screen resolution and then redirect to another page (but there likely are better ways to code this). This needs to work under 3 conditions; A) if the current top.location.href is similar to...
5
9311
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? Application.CurrentProject.Path\year\month\nbr 9.jpg and when pulled out, you get C:\Folder1\year\month\nbr 9.jpg with C:\Folder1 being the current path
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9023
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4366
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4615
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2327
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.