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. Advertisements

  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. Advertisements

  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. Advertisements

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. =?Utf-8?B?YWRvbGYgZ2FybGlj?=

    How to access client side XML data island from server side?

    =?Utf-8?B?YWRvbGYgZ2FybGlj?=, Nov 23, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,346
    aa7im
    Nov 23, 2004
  2. nick
    Replies:
    3
    Views:
    3,435
    Eliyahu Goldin
    Dec 15, 2004
  3. Replies:
    5
    Views:
    7,484
    Hemal Pandya
    Aug 4, 2005
  4. Boss302
    Replies:
    0
    Views:
    1,352
    Boss302
    Nov 21, 2006
  5. Keithb
    Replies:
    1
    Views:
    907
    bruce barker
    Feb 26, 2007
  6. Bogdan
    Replies:
    2
    Views:
    857
    Bogdan
    Jun 9, 2008
  7. Zoe Hart
    Replies:
    1
    Views:
    591
    Scott Wisniewski
    Jan 8, 2004
  8. nick
    Replies:
    1
    Views:
    319
    Victor Garcia Aprea [MVP]
    Dec 23, 2004
Loading...