I have recently setup a new development PC, which is 64 bit and has IIS 7. I am developing a web application, which I would regularly deploy to my old development PC. On my new development PC, I am prompted with the following error:
[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
I have debugged the error and I have traced it to the following line:
System.Net.Dns.GetHostByAddress(Request.ServerVariables.Item("REMOTE_HOST")).HostName
If I comment out this line, then it works perfectly. What is the problem with this line?
GetHostByAddress is obsolete now use GetHostEntry, please check below link
http://msdn.microsoft.com/en-us/library/dat0fbe2%28v=vs.80%29.aspx