Get username in Win/anon web

Discussion in 'ASP .Net Security' started by David, Apr 3, 2006.

  1. David

    David Guest

    ASP.NET 2.0

    We have a web site we are building and would like to get the username from
    our IIS6 web site using anonymous and Windows security. When a user is
    already logged in I would like to read their username if already logged into
    the network (intranet) and then if not, prompt with login page. If I just
    use windows integrated, I can get it with .Net below:

    strUser = LoginName1.Page.User.Identity.Name



    Is there anyway to get this in anon/windows combo? Thanks.

    David
     
    David, Apr 3, 2006
    #1
    1. Advertising

  2. have a look at Forms Authentication in the docs

    ---------------------------------------
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    > ASP.NET 2.0
    >
    > We have a web site we are building and would like to get the username
    > from our IIS6 web site using anonymous and Windows security. When a
    > user is already logged in I would like to read their username if
    > already logged into the network (intranet) and then if not, prompt
    > with login page. If I just use windows integrated, I can get it with
    > .Net below:
    >
    > strUser = LoginName1.Page.User.Identity.Name
    >
    > Is there anyway to get this in anon/windows combo? Thanks.
    >
    > David
    >
     
    Dominick Baier [DevelopMentor], Apr 3, 2006
    #2
    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. john
    Replies:
    0
    Views:
    430
  2. Olaf Petzold

    anon enums porting problem

    Olaf Petzold, Nov 8, 2005, in forum: C++
    Replies:
    0
    Views:
    367
    Olaf Petzold
    Nov 8, 2005
  3. Krist
    Replies:
    6
    Views:
    756
    Arne Vajhøj
    May 7, 2010
  4. Shailesh Patel
    Replies:
    0
    Views:
    465
    Shailesh Patel
    Nov 8, 2006
  5. Alex Washtell via .NET 247

    Web Service + Anon Access, but getting 401 Access Denied Error

    Alex Washtell via .NET 247, Apr 5, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    201
    Mauro Ottaviani [MSFT]
    Apr 5, 2005
Loading...

Share This Page