ASP. NET obtains the client information. For the moment, you need to add the client information ~~
1. Special attributes in ASP. NET:
Get Server computer name: Page. Server. ManchineName
Get User information: Page. User
Obtain the client computer name: Page. Request. UserHostName
Obtain the Client IP Address: Page. Request. UserHostAddress
2. General methods in network programming:
Get the current computer name: static System. Net. Dns. GetHostName ()
Retrieve all IP addresses based on the computer name: static System. Net. Dns. Resolve (computer name). AddressList
You can also obtain the computer name static System. Net. Dns. Resolve (IP address). HostName Based on the IP address.
3. General attributes of the system environment:
Current computer name: static System. Environment. MachineName
Domain Name of the current computer: static System. Environment. UserDomainName
Current computer user: static System. Environment. UserName
Client IP: Page. Request. UserHostAddress;
User information: Page. User;
Server computer name: Page. Server. MachineName;
Current user's computer name: System. Net. Dns. GetHostName ();
Current computer name: System. Environment. MachineName;
Domain Name of the current computer: System. Environment. UserDomainName;
Current computer user: System. Environment. UserName;
Browser type: Request. Browser. Browser;
Browser Id: Request. Browser. Id;
Browser Version: Request. Browser. Version;
Whether the Browser is a test version: Request. Browser. Beta;
Browser resolution (pixel): Request ["width"]. ToString () + "*" + Request ["height"]. ToString (); // 1280*1024
Client operating system: Request. Browser. Platform;
Is it a win16 system: Request. Browser. Win16;
Win32 system: Request. Browser. Win32;
Server Information:
Server computer name: "http: //" + HttpContext. Current. Request. Url. Host + HttpContext. Current. Request. ApplicationPath;
Server IIS Version: Request. ServerVariables ["Server_SoftWare"]. ToString ();
Server Domain Name: Request. ServerVariables ["SERVER_NAME"]. ToString (); server Domain Name: Request. ServerVariables ["HTTP_HOST"]
Server port: Request. ServerVariables ["Server_Port"]. ToString ();
Server IP Address: Request. ServerVariables ["LOCAl_ADDR"]
Server script timeout time: (Server. ScriptTimeout/1000). ToString () + "seconds ";
Server Operating System: Environment. OSVersion. ToString ();
The folder where this file is located: Request. PhysicalApplicationPath;
Server IE Version: Registry. LocalMachine. OpenSubKey (@ "SOFTWARE \ Microsoft \ Internet Explorer \ Version Vector"). Ge
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service