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

Discussion in 'ASP .Net' started by alexvodovoz@yahoo.com, May 25, 2007.

  1. Guest

    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, 2007
    #1
    1. Advertising

  2. Guest

    By the way. I am using asp.net 1.1, IIS5.1
     
    , May 25, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mogwaii
    Replies:
    3
    Views:
    995
    mogwaii
    Dec 10, 2010
  2. Phi!
    Replies:
    1
    Views:
    181
  3. COHENMARVIN

    location.href doesn't seem to work

    COHENMARVIN, Oct 11, 2005, in forum: Javascript
    Replies:
    2
    Views:
    144
    GĂ©rard Talbot
    Oct 12, 2005
  4. chandoo
    Replies:
    1
    Views:
    190
    elephant
    Aug 22, 2007
  5. menkaur

    window.location doesn't seem to work

    menkaur, Nov 28, 2009, in forum: Javascript
    Replies:
    8
    Views:
    274
    Thomas 'PointedEars' Lahn
    Nov 28, 2009
Loading...

Share This Page