1

我最近设置了一台新的开发 PC,它是 64 位并具有 IIS 7。我正在开发一个 Web 应用程序,我会定期将其部署到我的旧开发 PC 上。在我的新开发 PC 上,我收到以下错误提示:

[SocketException (0x273b): The requested protocol has not been configured into the system, or no implementation for it exists]
System.Net.Dns.InternalGetHostByAddress(IPAddress address, Boolean includeIPv6, Boolean throwOnFailure) +1576906
System.Net.Dns.GetHostByAddress(String address) +117
_Default.Page_Load(Object sender, EventArgs e) +154
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

我已调试该错误,并将其跟踪到以下行:

System.Net.Dns.GetHostByAddress(Request.ServerVariables.Item("REMOTE_HOST")).HostName

如果我注释掉这一行,那么它会完美运行。这条线有什么问题?

4

1 回答 1

0

GetHostByAddress 已过时,现在使用 GetHostEntry,请查看以下链接

http://msdn.microsoft.com/en-us/library/dat0fbe2%28v=vs.80%29.aspx

于 2012-04-13T13:35:15.333 回答