How to reject outside links to image or .rar resourses on my site?

Discussion in 'ASP .Net' started by pepwelcome@yahoo.com.cn, Mar 10, 2006.

  1. Guest

    I tried httpMoudle, and it seems it worked under VS.net 2005, but
    failed when I tried "http://localhost/", but I think an HTTP request
    for an image on my server is not processed by asp.net but is responsed
    directly by iis itself. What shall I do?
    =============
    What I have done:
    I wrote a rf.vb and compiled it to rf.dll and copied it to the /bin/
    directory.
    in the rf.vb file i intercepted any request and just
    response.write("OK!")
    Under VS.net 2005 environment it really works: whatever file I request,
    I just get an "OK".
    But when I closed vs.net 2005 and tried to input
    "http://localhost/a.jpg", the image showed!!!!
    What shall I do????
    , Mar 10, 2006
    #1
    1. Advertising

  2. Guest

    Anybody?!!!
    , Mar 10, 2006
    #2
    1. Advertising

  3. All requests for images and, indeed, any other files on your site, come from
    a client outside the site.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer

    Presuming that God is "only an idea" -
    Ideas exist.
    Therefore, God exists.

    <> wrote in message
    news:...
    > Anybody?!!!
    >
    Kevin Spencer, Mar 10, 2006
    #3
  4. On 9 Mar 2006 23:17:52 -0800, wrote:

    >I tried httpMoudle, and it seems it worked under VS.net 2005, but
    >failed when I tried "http://localhost/", but I think an HTTP request
    >for an image on my server is not processed by asp.net but is responsed
    >directly by iis itself. What shall I do?
    >=============
    >What I have done:
    >I wrote a rf.vb and compiled it to rf.dll and copied it to the /bin/
    >directory.
    >in the rf.vb file i intercepted any request and just
    >response.write("OK!")
    >Under VS.net 2005 environment it really works: whatever file I request,
    >I just get an "OK".
    >But when I closed vs.net 2005 and tried to input
    >"http://localhost/a.jpg", the image showed!!!!
    >What shall I do????

    I am working on the same issue. I'm getting closer :eek:) by trying to trap the
    URL of the host in global.aspx.cs, but have a way to go yet.

    In my case I want to trap specific Hosts and redirect them to another web site
    that describes copyright law ;o)

    Otis Mukinfus
    http://www.arltex.com
    http://www.tomchilders.com
    Otis Mukinfus, Mar 10, 2006
    #4
  5. On 9 Mar 2006 23:17:52 -0800, wrote:

    > I tried httpMoudle, and it seems it worked under VS.net 2005, but
    > failed when I tried "http://localhost/", but I think an HTTP request
    > for an image on my server is not processed by asp.net but is responsed
    > directly by iis itself. What shall I do?


    This is correct. One possible solution, which I don't like very much, is
    to map asp.net to handle the image files you are requesting, then your
    handler will work. (I assume that the DevEnv web server handles all
    requests, even images, through isapi_aspnet.dll, while IIS does not by
    default).

    Another option is to write your own ISAPI module, but you can't easily do
    this in managed code. You'll have to drop back to C/C++ to handle it.

    Finally, there are several third party ISAPI filters already on the market
    to handle this, you might find it more cost effective to purchase one of
    these.
    Erik Funkenbusch, Mar 10, 2006
    #5
  6. Guest

    to: Erik Funkenbusch,

    Yea, I AM using a third-party ISAPA named ISAPA_rewrite, but do you
    think it is more efficient for ISAPA_rewrite to deal with this problem
    or we write our own code with httpMolule?

    Anyway, maybe performance drawback is what we have to suffer when we
    try to protect our website.

    Thanks to all guys above!
    , Mar 12, 2006
    #6
    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. Boris Pelakh
    Replies:
    1
    Views:
    748
    VisionSet
    Nov 14, 2004
  2. Mike

    Mark unused resourses

    Mike, Jul 3, 2005, in forum: HTML
    Replies:
    1
    Views:
    448
    Spartanicus
    Jul 3, 2005
  3. Replies:
    1
    Views:
    329
    Peter Flynn
    May 27, 2005
  4. Bob Wheeler
    Replies:
    0
    Views:
    366
    Bob Wheeler
    Jun 30, 2003
  5. VC
    Replies:
    0
    Views:
    280
Loading...

Share This Page