Get domain name

前端 未结 6 1510
甜味超标
甜味超标 2020-12-17 07:58

My computer is in a Domain (Active Directory) and I need to get the domain name dynamically. I found the following code on the internet:

SelectQuery query =          


        
6条回答
  •  無奈伤痛
    2020-12-17 08:00

     protected void Page_Init(object sender, EventArgs e)
     {
       String hostdet = Request.ServerVariables["HTTP_HOST"].ToString();
     }
    

提交回复
热议问题