Hi,
You can get the
Machine name and
Logged in User name using following code:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
txtMachineName.Text = Dns.GetHostName();
System.Security.Principal.WindowsPrincipal p = System.Threading.Thread.CurrentPrincipal as System.Security.Principal.WindowsPrincipal;
txtUserName.Text = p.Identity.Name;
}
}
Please do let me know, if you have any doubt.
Please provide
Vote if this would be helpful to you.
Thanks,
Imdadhusen