Access Client Side Environmental Variables

Discussion in 'ASP .Net' started by =?Utf-8?B?U3RldmVu?=, Feb 17, 2005.

  1. I have an asp.net application written in VB.net. I want to access a client
    side environment variable. For instance, we set an environment variable for
    the UserName.

    So, I write the code for retrieving the UserName. Instead of getting my
    name, I get the name under which the IIS service must be running.... ASPNET.
    Is there a way to get the client side environmental variable?

    Thanks,

    Steven
     
    =?Utf-8?B?U3RldmVu?=, Feb 17, 2005
    #1
    1. Advertising

  2. Sure. Write a client-side ActiveX control that runs under the System account
    on the client. Of course, getting the user to permit that ActiveX Control on
    their machine could be tricky, but that's what security is all about.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Neither a follower nor a lender be.

    "Steven" <> wrote in message
    news:...
    >I have an asp.net application written in VB.net. I want to access a client
    > side environment variable. For instance, we set an environment variable
    > for
    > the UserName.
    >
    > So, I write the code for retrieving the UserName. Instead of getting my
    > name, I get the name under which the IIS service must be running....
    > ASPNET.
    > Is there a way to get the client side environmental variable?
    >
    > Thanks,
    >
    > Steven
     
    Kevin Spencer, Feb 17, 2005
    #2
    1. Advertising

  3. =?Utf-8?B?U3RldmVu?=

    Elton Wang Guest

    Hi Steven,

    Maybe followings are what you need:

    User.Identity.Name: user name (need to deny anonymous
    access)
    Request.UserAgent: the raw user agent string of the client
    browser
    Request.UserHostAddress: the IP host address of the remote
    client
    Request.UserHostName: the DNS name of the remote client

    HTH,

    Elton Wang



    >-----Original Message-----
    >I have an asp.net application written in VB.net. I want

    to access a client
    >side environment variable. For instance, we set an

    environment variable for
    >the UserName.
    >
    >So, I write the code for retrieving the UserName.

    Instead of getting my
    >name, I get the name under which the IIS service must be

    running.... ASPNET.
    >Is there a way to get the client side environmental

    variable?
    >
    >Thanks,
    >
    >Steven
    >.
    >
     
    Elton Wang, Feb 18, 2005
    #3
    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. Replies:
    5
    Views:
    7,285
    Hemal Pandya
    Aug 4, 2005
  2. Sathyaish

    Environmental Variables

    Sathyaish, Mar 13, 2006, in forum: Python
    Replies:
    12
    Views:
    610
    Dennis Lee Bieber
    Mar 14, 2006
  3. Casanova

    environmental variables

    Casanova, Dec 10, 2004, in forum: C Programming
    Replies:
    15
    Views:
    571
    Greg Comeau
    Dec 12, 2004
  4. Chris Gehlker

    Environmental variables in Ruby 1.8.5

    Chris Gehlker, Aug 28, 2006, in forum: Ruby
    Replies:
    2
    Views:
    329
    Chris Gehlker
    Aug 28, 2006
  5. jackster the jackle

    Setting Environmental Variables in Ruby script

    jackster the jackle, Oct 15, 2008, in forum: Ruby
    Replies:
    3
    Views:
    107
    jackster the jackle
    Oct 15, 2008
Loading...

Share This Page