Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Preventing Image Bandwidth Theft

Reply
Thread Tools

Preventing Image Bandwidth Theft

 
 
Med
Guest
Posts: n/a
 
      01-21-2007
Hi,

Is there a way to detect in asp.net if images are hot-linked from another
websites? I intend to create a default image and serve that image instead of
the image requested from another website?


Kind Regards

Med


 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      01-21-2007
It depends on what you mean by "hot-linked".


"Med" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> Is there a way to detect in asp.net if images are hot-linked from another
> websites? I intend to create a default image and serve that image instead
> of the image requested from another website?
>
>
> Kind Regards
>
> Med
>



 
Reply With Quote
 
 
 
 
Tim Van Wassenhove
Guest
Posts: n/a
 
      01-21-2007
Med schreef:
> Hi,
>
> Is there a way to detect in asp.net if images are hot-linked from another
> websites? I intend to create a default image and serve that image instead of
> the image requested from another website?


I can think of following techniques (but they're not 100% reliable)

- Check if a HTTP_REFERER header exists, and if it's value is an URL in
your website.

- Check if a cookie is present (the cookie should be generated on all
the pages in your website).


--
Tim Van Wassenhove <url:http://www.timvw.be/>
 
Reply With Quote
 
Henning Krause [MVP - Exchange]
Guest
Posts: n/a
 
      01-21-2007
Hello,

the problem here is that the image mime types are handled directly by IIS in
the default configuration. So you'll have to map the image mime types to the
ASP.NET engine, write a custom IHttpHandler class for those file types and
register it in the web.config.

Best regards,
Henning Krause


"Tim Van Wassenhove" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Med schreef:
>> Hi,
>>
>> Is there a way to detect in asp.net if images are hot-linked from another
>> websites? I intend to create a default image and serve that image instead
>> of the image requested from another website?

>
> I can think of following techniques (but they're not 100% reliable)
>
> - Check if a HTTP_REFERER header exists, and if it's value is an URL in
> your website.
>
> - Check if a cookie is present (the cookie should be generated on all the
> pages in your website).
>
>
> --
> Tim Van Wassenhove <url:http://www.timvw.be/>


 
Reply With Quote
 
Med
Guest
Posts: n/a
 
      01-21-2007
>It depends on what you mean by "hot-linked".

"Hot-Link" usually refers to the a URL embeded in the html to read a
file/image from another source/website instead of local file/image on the
web server's Folder. (i.e. <img
src="http://www.otherpeopleswebsite.com/images/cat.jpg"> instead of <img
src="images/cat.jpg">)

Thank you all for the suggestions. I think the http_referrer is the easier
option, however writing a custom IHttpHandler seems interesting too.


Regards

Med

"Med" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> Is there a way to detect in asp.net if images are hot-linked from another
> websites? I intend to create a default image and serve that image instead
> of the image requested from another website?
>
>
> Kind Regards
>
> Med
>



 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      01-21-2007
Ok, haven't heard that one. I usually just hear folks talk about "external
links".


"Med" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> >It depends on what you mean by "hot-linked".

>
> "Hot-Link" usually refers to the a URL embeded in the html to read a
> file/image from another source/website instead of local file/image on the
> web server's Folder. (i.e. <img
> src="http://www.otherpeopleswebsite.com/images/cat.jpg"> instead of <img
> src="images/cat.jpg">)
>
> Thank you all for the suggestions. I think the http_referrer is the
> easier option, however writing a custom IHttpHandler seems interesting
> too.
>
>
> Regards
>
> Med
>
> "Med" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Hi,
>>
>> Is there a way to detect in asp.net if images are hot-linked from another
>> websites? I intend to create a default image and serve that image instead
>> of the image requested from another website?
>>
>>
>> Kind Regards
>>
>> Med
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Theft Is Theft? Lawrence D'Oliveiro NZ Computing 7 11-08-2009 09:50 AM
Preventing image theft M HTML 6 06-04-2007 01:29 AM
Parsing HTML (preventing image prefetch) msasha@gmail.com Javascript 1 12-28-2006 12:44 AM
Preventing repeated clicks on Image button control Software Engineer ASP .Net Web Controls 0 09-20-2005 12:11 AM
ne1 have a script to prevent opposite mouse, preventing image theft? with message? CB HTML 9 12-04-2004 11:05 AM



Advertisments