Link to home
Start Free TrialLog in
Avatar of danirk2
danirk2

asked on

How to specify non-default source-IP for .net WebClient

Using .net WebClient to download a file, which works fine.

Machine has multiple network cards, hence multiple IP's.

WebClient uses the default IP as the source IP.

How can I force it to use a specific other IP as the source IP?
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

The WebClient class is a simplified wrapper for an HttpWebRequest, and doesn't provide much configuration options.  While I don't have an answer for the HttpWebRequest either, it might be easier to find a solution looking through stuff for HttpWebRequest, instead of the WebClient class.
ASKER CERTIFIED SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, Paul, I ran into work issues that diverted my attention, so I couldn't research...
Avatar of danirk2
danirk2

ASKER

Nice, thans