>I am not sure if I understand your solution.
> Will this control ensure that an image published at "http://
[quoted text clipped - 22 lines]
>> >
>> > Looking forward to your reply.
The pictures are private and not meant for public viewing - therefore
I must find a good way to hide them from the public internet. I guess
I will have the same problem with documents in just a while, but for
now my biggest concern is the pictures.
One thing that worries me concerning your solution:
Must the IP-range be predefined?
I do not know what IP the different users have, but I know they will
vary more than the range you suggest. I was hoping I could add
temporarily IP adresses to check if the person is logged at the moment
of the image download.
Thanks for your help so far.
royend.
> if you have a user control (not the actual image) and put all of your images
> in that control you *should* be able to hide it.
[quoted text clipped - 43 lines]
>
> - Vis sitert tekst -
Juan T. Llibre - 15 Jun 2007 07:37 GMT
re:
!> The pictures are private and not meant for public viewing - therefore
!> I must find a good way to hide them from the public internet.
!> I do not know what IP the different users have, but I know they will
!> vary more than the range you suggest.
This was answered by Mark a few days ago.
Assuming your network uses the 192.xxx.xxx.xxx range of IP addresses :
private void Page_Load(object sender, System.EventArgs e)
{
if
(!Request.ServerVariables["REMOTE_ADDR"].ToString().StartsWith("192"))
{
Response.Redirect ("/Login/entry_denied.aspx", false);
}
}
If your network uses the 10.xxx.xxx.xxx range, substitute a "10" for the "192".
If the network uses both, use an OR statement to include both starting addresses.
That will only allow IP addresses within your local network to access your files/images.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> The pictures are private and not meant for public viewing - therefore
> I must find a good way to hide them from the public internet. I guess
[quoted text clipped - 58 lines]
>>
>> - Vis sitert tekst -