-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
App service VNet Integration doesn't work correctly when using a default TcpClient #45991
Comments
Hi @jgoyvaerts Thanks for reaching out. We will review and update as appropriate. |
Apologies for the delay! We had been checking on this internally. Your feedback has been shared with the content owner for further review. |
Hi,
In the meantime, i'm going to use Mailkit as recommended on MS docs to handle modern auth mode. Hope this issue will be fixed soon |
Hi, Since SmtpClient relies on TcpClient, using Mailkit fixed my issue to send e-mail to smtp.office365.com:587. In the meantime, it will be great that this issue is documented on MS docs website |
We just experienced the same issue with the System.Net.Mail smtpclient. Mailkit works, but we also got another possible fix from MS support: Add the following app setting: WEBSITE_VNET_SUPPORT_DUAL_STACK_SOCKETS=1 did the trick for us |
@fgarcia-cnb that setting resolved our problem yesterday as well: Thank you! What are the odds I'd be viewing an issue that hasn't been commented on in 6 months and a magical solution appears that moment. |
Apologies for the delayed response regarding adding |
Is the WEBSITE_VNET_SUPPORT_DUAL_STACK_SOCKETS setting documented anywhere other than here? |
I didn't see @lonevvolf. I'll get this added to https://docs.microsoft.com/en-us/azure/app-service/reference-app-settings?tabs=kudu%2Cdotnet and mention it usage in this doc. Apologies for that. |
@RyanHill-MSFT Can't find this in the documentation link you referred to. As a matter of fact, can't find it anywhere in any official documentation. Am I just bad at googling or is it still not documented? 😅 |
Situation:
The TcpClient will default to a IPv6 socket (because the OS supports it), and an exception will occur:
ExtendedSocketException: An attempt was made to access a socket in a way forbidden by its access permissions [ipv6 address]
Setting the tcpclient explicitly to AddressFamily.InterNetwork fixes the issue, but this isn't a solution when using third party libraries to perform the connection.
Not sure if this is a bug in .NET core or azure app service, but it severely limits the use of App Service VNet integration
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: