473,505 Members | 13,925 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 '06 #1
5 1097
Anybody?!!!

Mar 10 '06 #2
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.

<pe********@yahoo.com.cn> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Anybody?!!!

Mar 10 '06 #3
On 9 Mar 2006 23:17:52 -0800, pe********@yahoo.com.cn 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 :o) 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
Mar 10 '06 #4
On 9 Mar 2006 23:17:52 -0800, pe********@yahoo.com.cn 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.
Mar 10 '06 #5
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 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1255
by: misha | last post by:
Hello. I found a lot of hot-links in the form, for example: <img src='http://www.my-works.org/images/faces/wave1.gif' /> that points directly on the images on my site. Actually I deny this...
8
9431
by: Abs | last post by:
Hi! I have an image inside a DIV box with its dimensions specified. The problem is that I don't know the dimensions of the image beforehand, therefore the image grows outside the box if it's...
18
1650
by: John at Free Design | last post by:
Thanks in advance for the help and let me know if this should be posted to another MSDN. I am developing a web-based application in VS.NET2003 using VB. When I insert a graphic into a project...
5
3316
by: Sally B. | last post by:
Hello, I searched, but couldn't find answers--probably because I'm not sure what this is called... Anyway, I have about 50 web pages and I want to have some JavaScript that will read in a list of...
2
2215
by: Michael Poirazi | last post by:
Hello I am trying to include some images in my applications resources. 1. Create New Item (Resource File) for my Project 2. Set the name to NetRes.resx 3. Add an image , set the name to Error (it...
9
3482
by: chrisspencer02 | last post by:
I am looking for a method to extract the links embedded within the Javascript in a web page: an ActiveX component, or example code in C++/Pascal/etc. I am looking for a general solution, not one...
8
2333
by: DJA | last post by:
Hello, I site I designed has links that don't seem to work in mac IE 5.2. In my site I'm using CSS to imitate image buttons by using the background image property along with a little extra...
4
2455
by: Corey Walker | last post by:
Hello: I am a webmaster for a non-profit organization. I do know some HTML, but I'm by no means an expert. Recently, many pages on our site were redesigned by a professional web designer, who...
7
5211
by: David Stone | last post by:
Run into something recently that has left me a little puzzled. According to the examples in section 13.6.1 of html 4.01... <http://www.w3.org/TR/html401/struct/objects.html#h-13.6.1.1> I...
0
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4698
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.