get windows login

  • Thread starter Thread starter ChiWhiteSox
  • Start date Start date
C

ChiWhiteSox

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
Windowsprincipal.Getuser().Name.

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

what am i missing ???
 
ChiWhiteSox said:
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
Windowsprincipal.Getuser().Name.

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

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top