asp.net a simple way to get basic information about the local computer _ practical Tips

Source: Internet
Author: User
1. Common methods in Network programming:
Get current computer name: StaticSystem.Net.Dns.GetHostName ()
Remove all IP address according to computer name: StaticSystem.Net.Dns.Resolve (computer name). AddressList
The computer name can also be removed according to the IP address: staticSystem.Net.Dns.Resolve (IP address). HostName

2. Common Properties of System environment class:
Current computer name: StaticSystem.Environment.MachineName
Current computer-owned network domain: StaticSystem.Environment.UserDomainName
Current Computer User: StaticSystem.Environment.UserName

3. Special properties in asp.net:
Get Server computer name: Page.Server.ManchineName
Get user information: Page.User
Get client computer name: Page.Request.UserHostName
Get client computer IP:Page.Request.UserHostAddress
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.