Preventing direct linking picture and video files ?

Discussion in 'ASP .Net' started by Petri, Apr 25, 2004.

  1. Petri

    Petri Guest

    Dear newsreaders,

    Access to aspx-pages can be prevented for example checking authentication
    cookie
    on page_onload part of code.
    But is there any way to prevent direct access to indivual files (eg.
    picture.jpg , video.wmv )
    so that instead of showing file contents there would be a redirection to an
    authentication form ?
    The idea here is to prevent direct / hotlinking to my web site resources.
    I am using a hosting service, so I do not have access to IIS settings.
    I would appreciate any idea.

    best regards,

    Petri
     
    Petri, Apr 25, 2004
    #1
    1. Advertisements

  2. Write an iHTTPModule that checks for the referrer and redirect if its not
    coming from within one of your pages.

    --
    Regards

    John Timney
    Microsoft Regional Director
    Microsoft MVP


    "Petri" <> wrote in message
    news:hXKic.797$...
    > Dear newsreaders,
    >
    > Access to aspx-pages can be prevented for example checking authentication
    > cookie
    > on page_onload part of code.
    > But is there any way to prevent direct access to indivual files (eg.
    > picture.jpg , video.wmv )
    > so that instead of showing file contents there would be a redirection to

    an
    > authentication form ?
    > The idea here is to prevent direct / hotlinking to my web site resources.
    > I am using a hosting service, so I do not have access to IIS settings.
    > I would appreciate any idea.
    >
    > best regards,
    >
    > Petri
    >
    >
    >
    >
     
    John Timney \(Microsoft MVP\), Apr 25, 2004
    #2
    1. Advertisements

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. Boki
    Replies:
    4
    Views:
    523
    Roedy Green
    Oct 27, 2005
  2. Erik van Duijn
    Replies:
    3
    Views:
    870
    Spartanicus
    Jan 30, 2004
  3. Replies:
    3
    Views:
    739
    Travis Newbury
    Feb 8, 2006
  4. wallge
    Replies:
    8
    Views:
    957
    wallge
    Jan 12, 2007
  5. thedarkman

    linking a video file

    thedarkman, Jan 3, 2007, in forum: HTML
    Replies:
    5
    Views:
    509
    joecool2000
    Jan 6, 2007
  6. thedarkman
    Replies:
    2
    Views:
    358
    thedarkman
    Jan 4, 2007
  7. David Buckley

    req converting video to flash video examples

    David Buckley, Apr 22, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    514
    Peter Bromberg [C# MVP]
    Apr 22, 2008
  8. Replies:
    8
    Views:
    1,697
    Mick White
    Apr 19, 2005
Loading...