Make images only available to intranet

Discussion in 'ASP .Net' started by royend@gmail.com, Jun 14, 2007.

  1. Guest

    Is it possible to hide images from the internet, and only have a image
    available for users that are logged into the intranet? I am hoping to
    avoid a database-solution as the number of images will be to many for
    my database-size.

    Looking forward to your reply.
     
    , Jun 14, 2007
    #1
    1. Advertising

  2. Mike Guest

    You could make a user control and only show that control based on IP
    addresses.
    So if someone reaches your web site and is within your IP range then show
    the control, if they are not then hide the control.

    Mike


    <> wrote in message
    news:...
    > Is it possible to hide images from the internet, and only have a image
    > available for users that are logged into the intranet? I am hoping to
    > avoid a database-solution as the number of images will be to many for
    > my database-size.
    >
    > Looking forward to your reply.
    >
     
    Mike, Jun 14, 2007
    #2
    1. Advertising

  3. Guest

    I am not sure if I understand your solution.
    Will this control ensure that an image published at "http://
    www.mydomain.com/image.jpg" only be available to users with correct
    IP?

    If so I believe it might be the solution as I can save the IP
    (temporarily) of the users logged on to the intranet, and let them
    download the images. Therefore I would appreciate some more info about
    "user control".

    royend.

    Mike skrev:
    > You could make a user control and only show that control based on IP
    > addresses.
    > So if someone reaches your web site and is within your IP range then show
    > the control, if they are not then hide the control.
    >
    > Mike
    >
    >
    > <> wrote in message
    > news:...
    > > Is it possible to hide images from the internet, and only have a image
    > > available for users that are logged into the intranet? I am hoping to
    > > avoid a database-solution as the number of images will be to many for
    > > my database-size.
    > >
    > > Looking forward to your reply.
    > >
     
    , Jun 14, 2007
    #3
  4. Mike Guest

    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.
    so for example if you have a range of IP address 190.0.0.1 to 190.0.0.999
    and if anyone accesses your site within that range show the control. If they
    are not within that range hide the control. If you want to do it at an image
    level then that could more work on your end.

    why do you want to hide the images from an internet user though? What if
    someone from the office hits the site and wants to see the images? Do you
    have the users logging in when they are on the office network or no?


    I had to do something similiar to this but with documents.

    <> wrote in message
    news:...
    >I am not sure if I understand your solution.
    > Will this control ensure that an image published at "http://
    > www.mydomain.com/image.jpg" only be available to users with correct
    > IP?
    >
    > If so I believe it might be the solution as I can save the IP
    > (temporarily) of the users logged on to the intranet, and let them
    > download the images. Therefore I would appreciate some more info about
    > "user control".
    >
    > royend.
    >
    > Mike skrev:
    >> You could make a user control and only show that control based on IP
    >> addresses.
    >> So if someone reaches your web site and is within your IP range then show
    >> the control, if they are not then hide the control.
    >>
    >> Mike
    >>
    >>
    >> <> wrote in message
    >> news:...
    >> > Is it possible to hide images from the internet, and only have a image
    >> > available for users that are logged into the intranet? I am hoping to
    >> > avoid a database-solution as the number of images will be to many for
    >> > my database-size.
    >> >
    >> > Looking forward to your reply.
    >> >

    >
     
    Mike, Jun 14, 2007
    #4
  5. Guest

    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.

    On 14 Jun, 16:26, "Mike" <> wrote:
    > 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.
    > so for example if you have a range of IP address 190.0.0.1 to 190.0.0.999
    > and if anyone accesses your site within that range show the control. If they
    > are not within that range hide the control. If you want to do it at an image
    > level then that could more work on your end.
    >
    > why do you want to hide the images from an internet user though? What if
    > someone from the office hits the site and wants to see the images? Do you
    > have the users logging in when they are on the office network or no?
    >
    > I had to do something similiar to this but with documents.
    >
    > <> wrote in message
    >
    > news:...
    >
    >
    >
    > >I am not sure if I understand your solution.
    > > Will this control ensure that an image published at "http://
    > >www.mydomain.com/image.jpg" only be available to users with correct
    > > IP?

    >
    > > If so I believe it might be the solution as I can save the IP
    > > (temporarily) of the users logged on to the intranet, and let them
    > > download the images. Therefore I would appreciate some more info about
    > > "user control".

    >
    > > royend.

    >
    > > Mike skrev:
    > >> You could make a user control and only show that control based on IP
    > >> addresses.
    > >> So if someone reaches your web site and is within your IP range then show
    > >> the control, if they are not then hide the control.

    >
    > >> Mike

    >
    > >> <> wrote in message
    > >>news:...
    > >> > Is it possible to hide images from the internet, and only have a image
    > >> > available for users that are logged into the intranet? I am hoping to
    > >> > avoid a database-solution as the number of images will be to many for
    > >> > my database-size.

    >
    > >> > Looking forward to your reply.- Skjul sitert tekst -

    >
    > - Vis sitert tekst -
     
    , Jun 15, 2007
    #5
  6. 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/
    ======================================
    <> wrote in message news:...
    > 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.
    >
    > On 14 Jun, 16:26, "Mike" <> wrote:
    >> 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.
    >> so for example if you have a range of IP address 190.0.0.1 to 190.0.0.999
    >> and if anyone accesses your site within that range show the control. If they
    >> are not within that range hide the control. If you want to do it at an image
    >> level then that could more work on your end.
    >>
    >> why do you want to hide the images from an internet user though? What if
    >> someone from the office hits the site and wants to see the images? Do you
    >> have the users logging in when they are on the office network or no?
    >>
    >> I had to do something similiar to this but with documents.
    >>
    >> <> wrote in message
    >>
    >> news:...
    >>
    >>
    >>
    >> >I am not sure if I understand your solution.
    >> > Will this control ensure that an image published at "http://
    >> >www.mydomain.com/image.jpg" only be available to users with correct
    >> > IP?

    >>
    >> > If so I believe it might be the solution as I can save the IP
    >> > (temporarily) of the users logged on to the intranet, and let them
    >> > download the images. Therefore I would appreciate some more info about
    >> > "user control".

    >>
    >> > royend.

    >>
    >> > Mike skrev:
    >> >> You could make a user control and only show that control based on IP
    >> >> addresses.
    >> >> So if someone reaches your web site and is within your IP range then show
    >> >> the control, if they are not then hide the control.

    >>
    >> >> Mike

    >>
    >> >> <> wrote in message
    >> >>news:...
    >> >> > Is it possible to hide images from the internet, and only have a image
    >> >> > available for users that are logged into the intranet? I am hoping to
    >> >> > avoid a database-solution as the number of images will be to many for
    >> >> > my database-size.

    >>
    >> >> > Looking forward to your reply.- Skjul sitert tekst -

    >>
    >> - Vis sitert tekst -

    >
    >
     
    Juan T. Llibre, Jun 15, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Natty Gur
    Replies:
    0
    Views:
    2,591
    Natty Gur
    Jun 6, 2004
  2. =?Utf-8?B?VHJldm9yIEJlbmVkaWN0IFI=?=
    Replies:
    0
    Views:
    2,403
    =?Utf-8?B?VHJldm9yIEJlbmVkaWN0IFI=?=
    Jun 7, 2004
  3. Advo
    Replies:
    11
    Views:
    3,303
  4. Replies:
    3
    Views:
    1,095
    Eliyahu Goldin
    Jan 17, 2007
  5. c676228
    Replies:
    4
    Views:
    361
    Adrienne Boswell
    Mar 17, 2008
Loading...

Share This Page