473,406 Members | 2,356 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,406 software developers and data experts.

<location> element does not seem to work - Does anybody know how to solve this.

Hi,

I have been struggling with this for the past couple of days. We have
a custom http module setup in our project to filter some requests. I
only want this module to be applied to certain pages. In order to try
to do this I have added the following test code in our web.config
file.

<location path="Login.aspx">
<system.web>
<httpModules>
<add type="AppTest.WebUI.RequestFilter, AppTest"
name="RequestFilter" />
</httpModules>
</system.web>
</location>

However when I visit the login.aspx page the module doesn't get
executed. Note, that if I change the path to be nothing, for example:.
<location path="">
<system.web>
<httpModules>
<add type="AppTest.WebUI.RequestFilter, AppTest"
name="RequestFilter" />
</httpModules>
</system.web>
</location>

the module executes perfectly however it is applied to every page and
not just the login.aspx page. I have tried pretty much every
combination in the path attribute. Things like "~/login.aspx",
"AppTest/login.aspx", etc. and nothing seems to work. Has anybody
come across this issue before, specifically with trying to apply
access permissions to an httpModule. I've seen a lot of examples with
the authorization element being used, but that is about it. Any help
would be greatly appreciated.

May 25 '07 #1
1 1248
By the way. I am using asp.net 1.1, IIS5.1

May 25 '07 #2

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

Similar topics

0
by: Joe Abou Jaoude | last post by:
I have an application that support multiple cultures. the main folder is english, and the subfolder "French" is french. I don't want to create a web config in the subfolder french to specify the...
1
by: Cantekin Guneser | last post by:
when i used <location> tag as follow; </system.web> <location path="members" allowOverride="false"> <system.web> <authentication mode="Forms"> <forms loginUrl="./default.aspx"></forms>...
2
by: joeted | last post by:
Hello, I am trying to run a batch file on a (remote) .NET server (i'm not the admin) using system.diagnostics.process I find that the batch file is successfully executed. However, when i...
10
by: Brian Henry | last post by:
Hi, I am having a problem with an attachment system I made... it works with files up to ~3MB in size then after that if you try to upload a file it just goes to a "Page can not be displayed" page...
1
by: Dica | last post by:
i've got a few pages on my site that don't require authentication. is it possible to specify each on of these in the same node within web.config, or do i have to repeat for each? i'd like to do the...
1
by: MAILTONRK | last post by:
Hi, I am a Mainframe guy. I am working with MS access(maintaining a application) for the last 2 weeks. I had one master database and four replicas. One of my replica had trouble in...
1
by: paris baughman | last post by:
Im trying to setup impersonation in the root directory and turn it off ( false ) in another directory. im doing to allow my crystal reports to work ( as i get the login failed message ) and also...
2
by: alexvodovoz | last post by:
Hi, I have been struggling with this for the past couple of days. We have a custom http module setup in our project to filter some requests. I only want this module to be applied to certain...
2
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. I need to deny unauthenticated users from accessing an excel file located within my webapp at SecurePages/ExcelFile1.xls. I've added the below <locationelement to my web.config, but it allows...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.