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. Advertising

  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. 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. Boki
    Replies:
    4
    Views:
    404
    Roedy Green
    Oct 27, 2005
  2. Erik van Duijn
    Replies:
    3
    Views:
    735
    Spartanicus
    Jan 30, 2004
  3. Replies:
    3
    Views:
    460
    Travis Newbury
    Feb 8, 2006
  4. wallge
    Replies:
    8
    Views:
    687
    wallge
    Jan 12, 2007
  5. Replies:
    8
    Views:
    1,242
    Mick White
    Apr 19, 2005
Loading...

Share This Page