Dim IPHEntry As IPHostEntry
Dim IPAdd() As IPAddress
Dim i As Integer
IPHEntry = System.Net.Dns.GetHostByName(Dns.GetHostName())
IPAdd = IPHEntry.AddressList
txtComputerName.Text = Dns.GetHostName()
txtIPAddress.Text = IPAdd(i).ToString
Dim theNetworkInterfaces() As System.Net.NetworkInformation.NetworkInterface = System.Net.NetworkInformation.NetworkInterface.Get AllNetworkInterfaces()
For Each currentInterface As System.Net.NetworkInformation.NetworkInterface In theNetworkInterfaces
If currentInterface.OperationalStatus = Net.NetworkInformation.OperationalStatus.Up And currentInterface.NetworkInterfaceType.ToString() = "Ethernet" Then
txtMACAddress.Text = currentInterface.GetPhysicalAddress.ToString
End If
Next
Klasik ASP'de bu kodlar çalışmaz.