Bug 44624 - Connecting to SQL Server using IPv4 exception.
Summary: Connecting to SQL Server using IPv4 exception.
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Data (show other bugs)
Version: 4.6.0 (C8)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
: 44315 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-22 14:09 UTC by Mathieu Morrissette
Modified: 2016-10-10 14:29 UTC (History)
4 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Project to reproduce the issue (11.63 KB, application/zip)
2016-10-05 12:37 UTC, Mathieu Morrissette
Details

Description Mathieu Morrissette 2016-09-22 14:09:30 UTC
I get an exception while trying to connect to a SQL Server with an IPv4 address but I get an exception which says 

"The AddressFamily InterNetwork is not valid for the System.Net.IPEndPoint end point, use InterNetworkV6 instead. Parameter name: socketAddress"

The issue is caused by commit https://github.com/mono/mono/commit/aeaf37296fe70da1e7f0d0d519c9ca965cc67ca9
Comment 1 Mathieu Morrissette 2016-09-23 00:32:36 UTC
*** Bug 44315 has been marked as a duplicate of this bug. ***
Comment 2 Marek Safar 2016-10-05 08:24:14 UTC
Could you attach code/configuration you are using to connect to SQL server
Comment 3 Mathieu Morrissette 2016-10-05 12:37:32 UTC
Created attachment 17884 [details]
Project to reproduce the issue
Comment 4 Mathieu Morrissette 2016-10-05 12:39:10 UTC
Here's the stack trace of the exception : https://gist.github.com/MathieuMorrissette/caeb40cf515c8ed700f15fafa842ab54

I've included a sample project as an attachment.

I'm using SQL Server 2014 and the only thing I changed in my server configuration is that I enabled TCP/IP in the SQL Configuration manager.

It happens on both the simulator and an iOS device. Both of them are running iOS 10.

Here's my xamarin config :
https://gist.github.com/MathieuMorrissette/74afc82b6e5983438e913c7673e2ea88
Comment 5 Marek Safar 2016-10-07 16:27:36 UTC
This appears to be mobile profile issue only
Comment 6 Marek Safar 2016-10-10 14:29:32 UTC
Fixed in master and Mono 4.8.

You could workaround it by disabling local ipv6 network

Note You need to log in before you can comment on or make changes to this bug.