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. I am using asp.net 1.1, IIS 5.1 2 2330
location filtering is not supported for httpmodules. if you install a
httpmodule, it will be called on all requests (or none if you specify a
path). you will need to add the filtering to your module.
while this is probably a bug, it is now a "known" behavior and will not
fixed in the next release.
-- bruce (sqlwork.com) al*********@yahoo.com wrote:
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. I am using asp.net 1.1, IIS 5.1
On May 25, 9:35 pm, bruce barker <nos...@nospam.comwrote:
location filtering is not supported for httpmodules. if you install a
httpmodule, it will be called on all requests (or none if you specify a
path). you will need to add the filtering to your module.
while this is probably a bug, it is now a "known" behavior and will not
fixed in the next release.
-- bruce (sqlwork.com)
alexvodo...@yahoo.com wrote:
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. I am using asp.net 1.1, IIS 5.1- Hide quoted text -
- Show quoted text -
Agree with Bruce. As a solution you may want to try get the url in the
http module and execute a code if Request.RawUrl will be equal to
"Login.aspx". This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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>...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |