get windows login

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Q2hpV2hpdGVTb3g=?=

    get windows login

    i have a webapp that needs to get the windows login of a user and maps it to
    my roles database.

    im using VS2005 and when i run it im able to get it using
    Windowsprincipa l.Getuser().Nam e.

    but after i put it into production server, (c:\inetpub\www root\webapp ) and
    run it on my browser, the username it gets was : COMPUTERNAME\AS PNET

    what am i missing ???
  • Jeroen Mostert

    #2
    Re: get windows login

    ChiWhiteSox wrote:
    i have a webapp that needs to get the windows login of a user and maps it to
    my roles database.
    >
    im using VS2005 and when i run it im able to get it using
    Windowsprincipa l.Getuser().Nam e.
    >
    but after i put it into production server, (c:\inetpub\www root\webapp ) and
    run it on my browser, the username it gets was : COMPUTERNAME\AS PNET
    >
    what am i missing ???
    You're missing the fact that by default, ASP.NET sites are accessed
    anonymously and sites will run under the credentials of the ASPNET account.

    See http://msdn2.microsoft.com/en-us/library/aa480475.aspx for more
    information on using Windows Authentication in ASP.NET.

    --
    J.

    Comment

    Working...