Preventing direct linking picture and video files ?

  • Thread starter Thread starter Petri
  • Start date Start date
P

Petri

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
 
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
 
Back
Top