获取计算机的IP地址 [英] Get IP address of the computer

查看:111
本文介绍了获取计算机的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码适用于Windows 2003服务器,但在Windows 2008服务器上不起作用。任何猜测?

Dim objIPHostEntry As IPHostEntry = Dns.GetHostEntry(Dns.GetHostName)
txtHost.Text = objIPHostEntry.AddressList(0).ToString

非常感谢非常有价值的支持。

JK

解决方案

http://nitoprograms.blogspot.com/2009/05/getting-local-ip-address.html

-Steve

The following code does work on Windows 2003 server but doesn't work on Windows 2008 server. Any guesses?

Dim objIPHostEntry As IPHostEntry = Dns.GetHostEntry(Dns.GetHostName)
txtHost.Text = objIPHostEntry.AddressList(0).ToString

Thanks very much for valuable support.

JK

解决方案

http://nitoprograms.blogspot.com/2009/05/getting-local-ip-address.html

       -Steve


这篇关于获取计算机的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆