Retrieve local machine's environment variable from ASP page

Ask a Question related to ASP Components, Design and Development.

  1. #1

    Default Retrieve local machine's environment variable from ASP page

    Hi ASP Expert,

    My goal is to retrieve my local machine's %USERNAME% environment variable
    from ASP page.
    When I enter [url]http://RemoteServerName/testusername.asp?id=%USERNAME%[/url] directly
    into the IE Browser URL box, %USERNAME% is repalced with the local machine
    ID. However, when I create a
    <a href="http://RemoteServerName/testusername.asp?id=%USERNAME%"> get
    mahcine id</a> in an html file and use Request.Querystring("id") to retrieve
    it in testusername.asp page, it returns "%USERNAME%". I guess IE browser is
    smart enough to replace %USERNAME% with the local environment variable value
    before sending URL string to the web server when you type directly into the
    Browser URL box.

    My question is , is there any way to retrieve local machine's environment
    variable, %USERNAME% from ASP page?

    Thanks very much!!!

    -adam

    adam Guest

  2. Similar Questions and Discussions

    1. How to retrieve locked NEW PAGE?
      (C3) My client has a writer and a publisher. The writer created a new page (thus I cannot yet see it by logging into the site through Dreamweaver)....
    2. Need to Access a Local Variable
      How do I access a variable that is generated within a function? For example, in the code below, I need to access the "count" variable (which is...
    3. Reading Environment Variable
      Has anyone got a tip for reading an environment variable on a client desktop into a cookie. Triyng to make a seamless integration on an intranet...
    4. #25071 [Opn->Bgs]: Let include/require look in PHP_INCLUDE environment variable
      ID: 25071 Updated by: sniper@php.net Reported By: jakob dot nielsen at nhst dot no -Status: Open +Status: ...
    5. #25071 [NEW]: Let include/require look in PHP_INCLUDE environment variable
      From: jakob dot nielsen at nhst dot no Operating system: Whatever PHP version: Irrelevant PHP Bug Type: Feature/Change...
  3. #2

    Default Re: Retrieve local machine's environment variable from ASP page


    "adam" <adam@discussions.microsoft.com> wrote in message
    news:B827A4F0-6073-4E71-9E0F-1DE5F361F514@microsoft.com...
    > Hi ASP Expert,
    >
    > My goal is to retrieve my local machine's %USERNAME% environment variable
    > from ASP page.
    > When I enter [url]http://RemoteServerName/testusername.asp?id=%USERNAME%[/url]
    directly
    > into the IE Browser URL box, %USERNAME% is repalced with the local machine
    > ID. However, when I create a
    > <a href="http://RemoteServerName/testusername.asp?id=%USERNAME%"> get
    > mahcine id</a> in an html file and use Request.Querystring("id") to
    retrieve
    > it in testusername.asp page, it returns "%USERNAME%". I guess IE browser
    is
    > smart enough to replace %USERNAME% with the local environment variable
    value
    > before sending URL string to the web server when you type directly into
    the
    > Browser URL box.
    >
    > My question is , is there any way to retrieve local machine's environment
    > variable, %USERNAME% from ASP page?
    >
    This is the third NG I've noticed you've posted this too. Multiposting is
    rude, don't do it.
    > Thanks very much!!!
    >
    > -adam
    >

    Anthony Jones Guest

  4. #3

    Default Re: Retrieve local machine's environment variable from ASP page

    Not sure about the environment variable, but if you are using NTLM or even
    basic authentication within your site, you can retrieve the current logged
    user on the machine by acessing Request.ServerVariables("AUTH_USER").

    Hope it helps,

    --
    --------------------------------------
    Carlos Vítor Barros
    - Web Developer
    --------------------------------------
    "adam" <adam@discussions.microsoft.com> escreveu na mensagem
    news:B827A4F0-6073-4E71-9E0F-1DE5F361F514@microsoft.com...
    > Hi ASP Expert,
    >
    > My goal is to retrieve my local machine's %USERNAME% environment variable
    > from ASP page.
    > When I enter [url]http://RemoteServerName/testusername.asp?id=%USERNAME%[/url]
    > directly
    > into the IE Browser URL box, %USERNAME% is repalced with the local machine
    > ID. However, when I create a
    > <a href="http://RemoteServerName/testusername.asp?id=%USERNAME%"> get
    > mahcine id</a> in an html file and use Request.Querystring("id") to
    > retrieve
    > it in testusername.asp page, it returns "%USERNAME%". I guess IE browser
    > is
    > smart enough to replace %USERNAME% with the local environment variable
    > value
    > before sending URL string to the web server when you type directly into
    > the
    > Browser URL box.
    >
    > My question is , is there any way to retrieve local machine's environment
    > variable, %USERNAME% from ASP page?
    >
    > Thanks very much!!!
    >
    > -adam
    >

    Carlos Vítor Barros Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139