0
Answer

Need to get Computer name When site hosted on server

sparsh saxena

sparsh saxena

10y
882
1

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