locked
ISAPI Filter - share memory? RRS feed

  • Question

  • User-202510524 posted

    Hi,

    I've written a custom ISAPI filter that redirects a request to another port if it asked for a special URL. There's a config-file that defines some ports on the server:

    [TargetUrlDef]
    http://localhost:8080
    http://localhost:8084
    http://localhost:8089

    And each user that requests http://localhost:80/redir.html should get redirected to one of these url definitions. That is no problem at all and it is working already. However, I want to redirect the users cyclically:

    First request -> Target-URL 1
    Second request -> Target-URL 2
    Third request -> Target-URL 3
    Fourth request -> Target-URL 1
    Fifth request -> Target-URL 2
    (and so on)

    Now I run into problems because each running instance of the ISAPI filter needs to know the last Target-URL the user has been redirected to.
    Thus, I need some shared memory each filter instance may access. File access will be too slow I guess and might cause problems with many requests.

    Could anybody tell me the direction to go?

    Regards
    Marco Buerckel

    Friday, February 8, 2008 6:11 AM

Answers

  • User1356161706 posted

    If you can't ensure that your ISAPI filter runs in the same AppPool Shared Memory is probably the way you have to go.

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, February 11, 2008 3:00 AM

All replies

  • User1356161706 posted

    If you can't ensure that your ISAPI filter runs in the same AppPool Shared Memory is probably the way you have to go.

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, February 11, 2008 3:00 AM
  • User742541801 posted

    Some existing Url Rewriting filters may allow you to code this in rules, rather than depending on writing your own filter.

    Tuesday, April 15, 2008 12:43 PM