DSN can return multiple IP addresses so rather then using DNS resolving to get the IP address after my request I want to get the IP that my HttpWebRequest connected to.
Is there anyway to do this in .NET 3.5?
For example when I do a simple web request to www.microsoft.com I want to learn that which IP address it connected to send the HTTP request, I want to this programmatically (not via Wireshark etc.)
This is a working example:
here you go
Use remoteEndPoint to collect the data you want.