httpModule...

Discussion in 'ASP .Net' started by =?Utf-8?B?UnlhbiBDcm9td2VsbA==?=, Sep 23, 2004.

  1. I have written an httpModule for use in our test environment. If a user goes
    to http://testserver/SomeApplication/MyPage.aspx it will resolve to the
    latest version of that application deployed:
    http://testserver/SomeApplication.1.0.10.0/MyPage.aspx, for instance.

    Problem is, the httpModule doesn't get called because
    http://testserver/SomeApplication doesn't exist. I assume this is because
    IIS is spitting it back, but I am not sure. Can someone help me figure out a
    decent way of getting that to work? Do I need an ISAPI filter instead?
     
    =?Utf-8?B?UnlhbiBDcm9td2VsbA==?=, Sep 23, 2004
    #1
    1. Advertising

  2. Ryan Cromwell wrote:
    > I have written an httpModule for use in our test environment. If a user goes
    > to http://testserver/SomeApplication/MyPage.aspx it will resolve to the
    > latest version of that application deployed:
    > http://testserver/SomeApplication.1.0.10.0/MyPage.aspx, for instance.
    >
    > Problem is, the httpModule doesn't get called because
    > http://testserver/SomeApplication doesn't exist. I assume this is because
    > IIS is spitting it back, but I am not sure. Can someone help me figure out a
    > decent way of getting that to work? Do I need an ISAPI filter instead?


    Because the file does not exist the worker process never gets a chance
    to play in the web request. Well the directory surely doesn't exist so
    you don't even get the default mapped file. IIS just throughs back the
    404 error. Note that that error is a htm page. You can configure this
    to use your own code. So I will bet that you can map the 404 error in
    IIS "Custom Errors" tab to your HttpModule code. But you will have to
    implement your HttpModule as a .ashx file. Now I haven't done this
    specifically I think this will work. Tell me if this works for you.

    Make sure that you check the url string and still send back the normal
    404 error content when a visitor hits a web site not in the url of interest.
     
    Joseph E Shook [MVP - ADSI], Oct 1, 2004
    #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. Jon Sequeira
    Replies:
    3
    Views:
    4,221
    gerry
    Jun 26, 2003
  2. PJ

    HttpModule

    PJ, Jul 17, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    624
    Saravana
    Jul 18, 2003
  3. Gary Varga
    Replies:
    0
    Views:
    355
    Gary Varga
    Jul 18, 2003
  4. Peter Rilling
    Replies:
    1
    Views:
    528
    Dhananjay Modak
    Aug 5, 2003
  5. Juha Borenius

    HttpModule or Global.asax

    Juha Borenius, Aug 13, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    651
    S. Justin Gengo
    Aug 13, 2003
Loading...

Share This Page