Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BindIPEndPointDelegate does not work properly [.NET Core 2.2] #28436

Closed
nsentinel opened this issue Jan 16, 2019 · 6 comments
Closed

BindIPEndPointDelegate does not work properly [.NET Core 2.2] #28436

nsentinel opened this issue Jan 16, 2019 · 6 comments
Milestone

Comments

@nsentinel
Copy link

Setting BindIPEndPointDelegate in the ServicePoint for HttpWebRequest does not do anything, the real binding of the IP address (delegate call) does not occur.

A quick search through the repository showed that there is no real binding to local IP in the source code.

Is this functionality is not yet ready to use in the .NET Core?

It works as expected in regular .NET

@rmkerr
Copy link
Contributor

rmkerr commented Jan 16, 2019

There are several features of ServicePoint and ServicePointManager that are not implemented in .NET Core. @davidsh do you know why this specific feature was left out?

@davidsh
Copy link
Contributor

davidsh commented Jan 16, 2019

There are no plans to implement this in .NET Core specifically. We don't want to continue the global ServicePointManager design.

However, we are thinking of ways of having an API to control socket connection, network interface selection, etc. There are several other issues in the repo tracking that. Those would end up adding API surface for the HttpClient API via HttpClientHandler/SocketsHttpHandler.

@karelz @geoffkizer

@davidsh
Copy link
Contributor

davidsh commented Jan 16, 2019

Similar issue: #23267

@nsentinel
Copy link
Author

Thanks for the explanation! I will track the status of related tickets to understand the progress.

@davidsh
Copy link
Contributor

davidsh commented Jan 16, 2019

Closing in favor of #23267.

@davidsh davidsh closed this as completed Jan 16, 2019
@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@msftgits msftgits added this to the 3.0 milestone Feb 1, 2020
@Pro100AlexHell
Copy link

I have simple task - detect remote IP address to which http client is connected. I don't want to DNS resolve, but need exactly remote IP.
I didn't understand how to detect remote IP in net core 3.1.
Also I have no time for reading all of topics regarding breaking changes and new API.

I have found solution for .net - https://stackoverflow.com/questions/6655713/how-to-get-ip-address-of-the-server-that-httpwebrequest-connected-to but it doesn't work as it is for dot net, but not core.

Answer please, my simple question.
I can use WebRequest or HttpClient or anything you suggest.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants