[CSHARP-4436] .NET/C# driver fails to create new mongo client in xamarin Created: 01/Dec/22 Updated: 28/Oct/23 Resolved: 02/Mar/23 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.19.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Santiago Suarez | Assignee: | Dmitry Lukyanov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Case: | (copied to CRM) | ||||||||
| Documentation Changes: | Not Needed | ||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||
| Description |
| Comments |
| Comment by Githook User [ 24/Mar/23 ] |
|
Author: {'name': 'Dmitry Lukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}Message: |
| Comment by Dmitry Lukyanov (Inactive) [ 02/Mar/23 ] |
|
The scope of this ticket was limited to making DnsClientWrapper lazy that will allow avoiding this issue for cases where srv resolving is not required. Please follow to CSHARP-4556 for further improvements here |
| Comment by Githook User [ 02/Mar/23 ] |
|
Author: {'name': 'Dmitry Lukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}Message: |
| Comment by James Kovacs [ 02/Dec/22 ] |
|
The .NET/C# Driver uses DnsClient.NET, a third-party DNS library, for resolving SRV and TXT records. Unfortunately it appears that increased security restrictions around DNS introduced in Android Oreo prevent DnsClient.NET from working correctly. See issue #17 in DnsClient.NET's issue tracker. Given that the issue is closed, it doesn't appear that a fix is forthcoming. You can work around this issue by using the standard connection string format (AKA mongodb://) rather than the DNS seedlist format (AKA mongodb+srv://). A and CNAME record lookups use .NET's built-in capabilities and don't require any third-party libraries. Unfortunately these built-in capabilities do not include SRV and TXT record lookups, which is why we depend on DnsClient.NET for these record types. Closing this ticket as this is a limitation of a third-party library and we are not aware of another third-party library that can work around this issue. |