Tie a file an IP address

Discussion in 'ASP General' started by creamy, Jul 31, 2006.

  1. creamy

    creamy Guest

    Please i would like to know if it is possible to restict a file to an
    IP address. i.e: It would only open on a system based on its IP
    address. Thanks.
    creamy, Jul 31, 2006
    #1
    1. Advertising

  2. creamy

    Evertjan. Guest

    creamy wrote on 31 jul 2006 in microsoft.public.inetserver.asp.general:

    > Please i would like to know if it is possible to restict a file to an
    > IP address. i.e: It would only open on a system based on its IP
    > address. Thanks.


    If you mean based on the remote client's IP address,
    [insofar as no proxi is used by the cliest]
    and by "open" "showing it's rendered content":

    <% 'vbscript
    q = request.servervariables("remote_addr")
    If q <> "123.456.789.123" then server.transfer "\404.asp"
    %>
    <html>
    <body>
    My terrible secrets
    .....


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jul 31, 2006
    #2
    1. Advertising

  3. "creamy" <> wrote in message
    news:...
    > Please i would like to know if it is possible to restict a file to an
    > IP address. i.e: It would only open on a system based on its IP
    > address. Thanks.
    >


    In IIS Manager find the ASP file or folder that you want to restrict access
    to.
    Open properties and selecte security tab
    In IP address and domain name restrictions click edit...
    Ensure Grant Access is selected then click Add..
    Add the IP address or range of address you want to give access.

    Anthony.
    Anthony Jones, Jul 31, 2006
    #3
  4. creamy

    creamy Guest

    Thanks,
    But the server.transfer... doesn't seem to work. What now. Thanx.
    creamy, Aug 1, 2006
    #4
  5. "creamy" <> wrote in message
    news:...
    > Thanks,
    > But the server.transfer... doesn't seem to work. What now. Thanx.
    >


    Could eloborate? In what way does it not work?
    Anthony Jones, Aug 1, 2006
    #5
    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. Jonathan Weekes

    Tie to change line in file

    Jonathan Weekes, Sep 14, 2003, in forum: Perl
    Replies:
    0
    Views:
    486
    Jonathan Weekes
    Sep 14, 2003
  2. Carlo Filippini

    Tie a file handle to a variable

    Carlo Filippini, Sep 29, 2003, in forum: Perl
    Replies:
    1
    Views:
    436
  3. Carlo Filippini

    Tie a file handle to a variable

    Carlo Filippini, Sep 29, 2003, in forum: Perl
    Replies:
    3
    Views:
    626
    Kris Wempa
    Oct 1, 2003
  4. SpecialK

    Tie a file to a hash

    SpecialK, Feb 19, 2004, in forum: Perl
    Replies:
    1
    Views:
    461
    Ben Morrow
    Feb 19, 2004
  5. botfood

    tie() with DB_File not tie()ing ?

    botfood, Apr 24, 2006, in forum: Perl Misc
    Replies:
    23
    Views:
    441
    botfood
    Apr 26, 2006
Loading...

Share This Page