get user information

Discussion in 'ASP .Net' started by sck10, Apr 28, 2005.

  1. sck10

    sck10 Guest

    Hello,

    I built a web site on our companies intranet. Is there a way to get the
    user information (user name, machine name etc.) when a person views a web
    page?

    --
    Thanks in advance,

    sck10
     
    sck10, Apr 28, 2005
    #1
    1. Advertising

  2. sck10

    Brock Allen Guest

    If you're authenticating the user somehow then User.Identity.Name will get
    thir name. For the other stuff, you can access Request.UserHostAddress and
    Request.UserHostName.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > Hello,
    >
    > I built a web site on our companies intranet. Is there a way to get
    > the user information (user name, machine name etc.) when a person
    > views a web page?
    >
    > sck10
    >
     
    Brock Allen, Apr 28, 2005
    #2
    1. Advertising

  3. For intranet web application, you can use Windows authentication and deny
    anonymous access. Then you can use Page.User.Identity.Name to determine user;
    and use Page.User.IsInRole(strRole) to determines whether the current
    principal belongs to the specified role.

    HTH

    Elton Wang


    "sck10" wrote:

    > Hello,
    >
    > I built a web site on our companies intranet. Is there a way to get the
    > user information (user name, machine name etc.) when a person views a web
    > page?
    >
    > --
    > Thanks in advance,
    >
    > sck10
    >
    >
    >
     
    =?Utf-8?B?RWx0b24gVw==?=, Apr 29, 2005
    #3
  4. Patrick Olurotimi Ige, Apr 29, 2005
    #4
  5. You can also deny anonymous Access for specific application in Web.config file.


    "Patrick Olurotimi Ige" wrote:

    > Make sure u deny Anonymous Access in IIS!
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    >
     
    =?Utf-8?B?RWx0b24gVw==?=, Apr 29, 2005
    #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. z. f.
    Replies:
    0
    Views:
    691
    z. f.
    Feb 3, 2005
  2. subrato
    Replies:
    8
    Views:
    923
    Juan T. Llibre
    Mar 14, 2006
  3. clercmedia
    Replies:
    2
    Views:
    32,336
    clercmedia
    Dec 9, 2005
  4. lerenard001
    Replies:
    0
    Views:
    430
    lerenard001
    Jul 7, 2008
  5. lerenard001
    Replies:
    0
    Views:
    477
    lerenard001
    Jul 9, 2008
Loading...

Share This Page