Is there a way to prohibit images from being viewed (linked directly to)
unless they are loaded from a page in my application?
I'm working on a project where one can create galleries of images. Some of
these galleries can be PWD protected. Of course, it's easy to protect the
ASPX files, but the images are just images, so one could send a link to a
specific image to someone outside of the secured gallery.
There's nothing terribly high-secure about these images, so it's not a huge
deal as it is, but if there's a way, I'd be interested in looking into it.
I know one option is to move the images outside the WWW folder and then
stream them to the user from a request, but that, obviously, won't allow one
to see the images on the pages themselves.
-Darrel 8 1124
You can map the .net process to handle images in iis under
configuration.
under home directory go to configuration add the .jpg extensin and map
it to aspnet_isapi.
session_onstart
"darrel" <no*****@nowhere.com> wrote in message
news:uN****************@TK2MSFTNGP05.phx.gbl... Is there a way to prohibit images from being viewed (linked directly to) unless they are loaded from a page in my application?
I'm working on a project where one can create galleries of images. Some of these galleries can be PWD protected. Of course, it's easy to protect the ASPX files, but the images are just images, so one could send a link to a specific image to someone outside of the secured gallery.
There's nothing terribly high-secure about these images, so it's not a huge deal as it is, but if there's a way, I'd be interested in looking into it.
I know one option is to move the images outside the WWW folder and then stream them to the user from a request, but that, obviously, won't allow one to see the images on the pages themselves.
-Darrel
> You can map the .net process to handle images in iis under configuration. under home directory go to configuration add the .jpg extensin and map it to aspnet_isapi.
What would that do, then...only grant permission to image access to IIS?
How doable is it to do this on Web host's shared servers (ie, not my
server)?
-Darrel
> session_onstart
Hmm...sounds like to use that I need to then stream everything? Are their
cons to that method?
-Darrel
Hello Darrel,
You can create your custom http_handler that manage a list of image that
can be viewed for free
or extending the idea a select on some datasource that return a boolean value
if image is available
without password.
Andrea
If you install the mapping asp net form authentication will protect the
images in the same way it protects the pages. I would think the host
would be willing to work with you but i guess it depends on the
company.
I think that if you take andrees suggestion you will still need to map
the extension to aspnet_isapi.
Try it on your local to see how it works.
>>, won't allow one to see the images on the pages themselves.
Apart from the other suggestions I'm not sure what you meant. If you use the
URL to this page in an IMG or whatever less HTML tag it works as expected...
--
Patrice
"darrel" <no*****@nowhere.com> a écrit dans le message de news:
uN****************@TK2MSFTNGP05.phx.gbl... Is there a way to prohibit images from being viewed (linked directly to) unless they are loaded from a page in my application?
I'm working on a project where one can create galleries of images. Some of these galleries can be PWD protected. Of course, it's easy to protect the ASPX files, but the images are just images, so one could send a link to a specific image to someone outside of the secured gallery.
There's nothing terribly high-secure about these images, so it's not a huge deal as it is, but if there's a way, I'd be interested in looking into it.
I know one option is to move the images outside the WWW folder and then stream them to the user from a request, but that, obviously, won't allow one to see the images on the pages themselves.
-Darrel
No, you don't need to stream. I just meant that you could force a redirect
in session_onstart so they couldn't load images unless they were logged in
properly
Jeff
"Darrel" <no*****@nospam.com> wrote in message
news:eI**************@TK2MSFTNGP05.phx.gbl... session_onstart
Hmm...sounds like to use that I need to then stream everything? Are their cons to that method?
-Darrel This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: benny |
last post by:
Hi,
Anyone use cassini to deploy the asp.net web application face the following
problem?
I have the asp.net web application that consist the login page and Default
page where I always face the...
|
by: Ben Long |
last post by:
Hi All,
A partner of mine has been charged with identifying a performance /
load problem currently experienced on one of our websites.
I'm thinking it may be a combination of HTML formatting...
|
by: windandwaves |
last post by:
Hi
I have the following html:
<div id="menu">
<div id="m1"><a href="m1.php"><img src="m1.gif" alt="m1"></a></div>
<div id="m2"><a href="m2.php"><img src="m2.gif" alt="m2"></a></div>
<div...
|
by: Alan Searle |
last post by:
I am a newby to javascript and would like to have a section on one page
where pictures change every 5 seconds.
I found some example sites which do what I want and I have tried to
'borrow' and...
|
by: Jim |
last post by:
I know this is a little off-topic for C#, but I'm writing
my user controls with C#, and the other more HTML-related
groups looked like there hasn't been activity in days for
some reason......
|
by: E |
last post by:
I have 2 aspx pages... neither of which do anything out of the ordinary.
One of the pages automatically generates this block of code when viewed at
the client:...
|
by: phil-news-nospam |
last post by:
Why does SVG need a different tag than other images?
IMHO, SVG should be implemented as an image type just like any other image
type, allowing it to work with <img> tags, and ... here is the...
|
by: RMWChaos |
last post by:
I have four pieces of code to automatically build my navigation buttons and choose which page to load: 1) a hover script, which swaps the images onmouseover and onmouseout, 2) a DOM loader, which...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
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...
| |