[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

How does WebClient use the multiple IP addresses that can result from a hostname DNS lookup?

Nacho

8/13/2008 1:08:00 AM

Hi there,

I was wondering if someone could point me in the right direction with
how the .net 2.0 frameworks WebClient class uses the multiple IP
addresses that can be resolved when a hostname is looked up.

To frame the question, look at a dig for www.google.com:

;; QUESTION SECTION:
;www.google.com. IN A

;; ANSWER SECTION:
www.google.com. 154705 IN CNAME www.l.google.com.
www.l.google.com. 300 IN A 209.85.173.99
www.l.google.com. 300 IN A 209.85.173.103
www.l.google.com. 300 IN A 209.85.173.104
www.l.google.com. 300 IN A 209.85.173.147

;; AUTHORITY SECTION:
l.google.com. 43689 IN NS f.l.google.com.
l.google.com. 43689 IN NS g.l.google.com.
l.google.com. 43689 IN NS a.l.google.com.
l.google.com. 43689 IN NS b.l.google.com.
l.google.com. 43689 IN NS c.l.google.com.
l.google.com. 43689 IN NS d.l.google.com.
l.google.com. 43689 IN NS e.l.google.com.

You can see that www.google.com resolves to www.l.google.com, which in
turn resolves to four different ip addresses.

What I would like to understand is how WebClient uses these four
different addresses.

Also, I would like to use this mechanism to provide a "last line of
defence" availability strategy. If WebClient does support using these
multiple addresses, is it possible to control how it uses these
addresses? I mean, I would like to have some control over the way the
webclient fails over between the different addresses.

Thanks,
Nigel