sparsh saxena

sparsh saxena

  • NA
  • 1
  • 845

Need to get Computer name When site hosted on server

Sep 2 2014 2:27 AM

i would like to get the computer name when my site is hosted on server.

i will get the username when i running my site from local. here is my code.

 PrincipalContext ctx = new PrincipalContext(ContextType.Domain);  UserPrincipal userp = UserPrincipal.Current; 

but when i publish my site on  server i m not getting the system name