We help IT Professionals succeed at work.

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

danirk2
danirk2 asked
on
943 Views
Last Modified: 2013-11-26
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?
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2008

Commented:
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.
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2008

Commented:
Thanks, Paul, I ran into work issues that diverted my attention, so I couldn't research...

Author

Commented:
Nice, thans
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.