webly
webly

Reputation: 327

Specify which Network Card/Connection Winhttp Must Use

I have an application in C# that utilizes Winhttp to make web requests. Is there a way to specify which network card WinHTTP must utilize for its connections?

Upvotes: 2

Views: 1323

Answers (2)

Ari Pernick
Ari Pernick

Reputation: 469

There is no publically available option for WinHTTP or WinInet to do Interface Affinity. It appears to be supported in System.Net via the BindIPEndPointDelegate on the Request's ServicePoint.

I am curious what the scenario is to force a specific interface since it points to a problem in the rest of the stack to need such a thing.

Upvotes: 2

lod3n
lod3n

Reputation: 2903

WinHTTP is at the wrong spot on the OSI model to deal with hardware level stuff like that. You're going to want to look at modifying the routing table instead.

Upvotes: 0

Related Questions