I'm using the 1.4.1 version of DocumentDB client for .Net and when I try to update a document in the collection I get this error:
DocumentClientException: Server could not parse the Url.
When I do:
await _repository.Client.ReplaceDocumentAsync(DocumentsLink, document);
where Client is a DocumentClient and DocumentsLink is an URI for path dbs/9TBhAA==/colls/9TBhANQ4yAA=/docs/
constructed this way:
public Uri DocumentsLink
{
get
{
if (string.IsNullOrEmpty(_documentsLink))
{
_documentsLink = _repository.Collection.DocumentsLink;
}
return new Uri(_documentsLink, UriKind.Relative);
}
}
and document a simple json doc.
This code has been working fine on a different collection on the same database.
I get the same error if I use the linq extension and pass a string instead of a relative URI.
Anyone has pointers on how to resolve this issue?
adbs/9TBhAA==/colls/9TBhAPqqYgE=/docs/? It shouldn't start witha. - David Makogon