如果是内部IP,即保留的ip以192,10等开头,是不能通过internet用其ip地址访问的
解决方案 »
- 将窗体加载到 panel 中,如何让窗体不能移动呢?
- C# DataGridView如何实现拖拽功能?
- 当表中插入一条记录时ID自增1的sql server存储过程怎么写
- 求一个简单的登录界面 登陆后提示欢迎登陆用户
- 网址转码http://www.csdn.net 转为 http%3a%2f%2fwww.csdn.net
- c#中怎么用CDONTS发邮件。
- C#引用word常量问题
- 如何编个返回结果为DataReader的函数?
- 如何在C#中画图表?mschart控件怎么用?
- 如何在winform中画线?
- 请问各位朋友:如何将遍历一棵树按照某一个条件进行修改结点?
- 如何编程获取rar文件中的内容
这个只能用activex控件
让客户下载...如果它不下,好象很难:(
IPAddress[] address = hostInfo.AddressList;
String[] alias = hostInfo.Aliases; Response.Write("Host name : " + hostInfo.HostName + "<br>");
Response.Write("\nAliases : " + "<br>");
for(int index=0; index < alias.Length; index++)
{
Response.Write(alias[index] + "<br>");
}
Response.Write("\nIP address list : " + "<br>");
for(int index=0; index < address.Length; index++)
{
Response.Write(address[index] + "<br>");
}
using System.IO;
using System.Net;
using System.Text;
using System.Diagnostics;namespace ZZConsoleTest
{
public class ZZConsole
{
[STAThread]
static void Main(string[] args)
{
//String hostName = Dns.GetHostName(); IPHostEntry hostInfo = Dns.GetHostByName("www.163.com");
IPAddress[] address = hostInfo.AddressList;
String[] alias = hostInfo.Aliases; Console.WriteLine("Host name : " + hostInfo.HostName);
Console.WriteLine("\nAliases : ");
for(int index=0; index < alias.Length; index++)
{
Console.WriteLine(alias[index]);
}
Console.WriteLine("\nIP address list : ");
for(int index=0; index < address.Length; index++)
{
Console.WriteLine(address[index]);
}
Console.WriteLine("完成");
Console.ReadLine();
}
}
}