Retrieve username
How can i retrieve the username in Windows Authentication?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Feb 29, 2012, 5:50 AM
please refer,
http://www.codeproject.com/Articles/37558/Windows-Authentication-Using-Form-Authentication
http://weblogs.asp.net/scottgu/archive/2006/07/12/Recipe_3A00_-Enabling-Windows-Authentication-within-an-Intranet-ASP.NET-Web-application.aspx
very good article on Windows Authentication
SenthilkumarPosted Feb 29, 2012, 3:56 AM
You can get from this statement
System.Environment.UserName.ToString();
System.Environment.UserDomainName.ToString();
Satyapriya NayakPosted Feb 27, 2012, 1:13 AM
using System.Web.Security;
string username = User.Identity.Name.ToString();
Thanks