本文介绍了从代理服务器跟踪IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我需要跟踪连接到代理服务器的计算机的IP地址.我遇到了错误.我的代码如下.
Hi to All,
I need to Track the IP Address of computer that is connected to a proxy server. I am facing an error. I have code stated below.
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Web.ClientServices.Providers;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
private StringCollection GetIPs()
{
dynamic localIP = new StringCollection();
dynamic localHostName = Dns.GetHostName();
dynamic hostEntry = Dns.GetHostEntry(localHostName);
// Grab all ip addesses.
foreach (System.Net.IPAddress ipAddr in hostEntry.AddressList)
{
localIP.Add(ipAddr.ToString());
}
return localIP;
}
}
}
错误是
Error is
Error 42 The type or namespace name 'dynamic' could not be found (are you missing a using directive or an assembly reference?)
C:\Documents and Settings\Amul\Desktop\AJAXAMULabcd\STARTPAGE.aspx.cs 40 9 C:\...\AJAXAMULabcd\
请提出.
问候,
Amul V V Wayangankar
Kindly Suggest.
Regards,
Amul V V Wayangankar
推荐答案
这篇关于从代理服务器跟踪IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!