System.Net.Dns methods slow when run from C# DLL hosted in IE.

System.Net.Dns methods slow when run from C# DLL hosted in IE.

am 15.08.2006 00:39:02 von ApuNahasapeemapetilon

The runtime environment is .NET CLR v1.1.

I've got a C# DLL that contains the following code:

IPHostEntry hostInfo = Dns.GetHostByName(this.ComputerName);

When the DLL containing the above code is hosted in a C# client, the above
code run fast (sub-second). When the DLL containing the above code is hosted
in IE it takes about 2 minutes to run.

I've tried other Dns methods (like Dns.GetHostByAddress, and Dns.Resolve),
but they all take about 2 minutes to complete (when hosted in IE).

My goal is to bind to a specific port on the "localhost" and listen for
incomming IP messages. Here's all the relevant code:
IPHostEntry hostInfo = Dns.GetHostByName(this.ComputerName);
IPAddress[] address = hostInfo.AddressList;
IPEndPoint ipLocalEndPoint = new IPEndPoint(address[0],
Int32.Parse(listenPort));

Is this a known problem in CLR 1.1 with code hosted in IE? Can any one think
of a workaround?

Thank you.