[CSHARP-2524] MongoUrlBuilder creates wrong url. Created: 15/Feb/19 Updated: 16/Nov/21 Resolved: 25/Feb/19 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Sebastian Stehle | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Hi, I use the MongoUrlBuilder to extract the database name from a connection string, but the following code throws an exception var mongoUrl = new MongoUrlBuilder("mongodb+srv://user:pass@host/Database?retryWrites=true") { DatabaseName = null }; ConnectionString = mongoUrl.ToMongoUrl(); MongoConfigurationException When I use .ToString() I the following url back: mongodb+srv://user:pass@host:53/?ssl=true;retryWrites=true
Which then throws the same exception when creating a MongoClient. |
| Comments |
| Comment by Sebastian Stehle [ 15/Feb/19 ] |
|
Sorry, dupliacate of # |