Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

NullReferenceException: Object reference not set to an instance of an object. #44

Open
rhalaly opened this issue Jan 5, 2019 · 4 comments

Comments

@rhalaly
Copy link

rhalaly commented Jan 5, 2019

I'm receiving NullReferenceException: Object reference not set to an instance of an object. Microsoft.Azure.Documents.DocumentCollection.get_DocumentsLink() when I use that project with Microsoft.Azure.DocumentDB v2.2.1.

It seems that DocumentsLink property is using SelfLink but new DocumentCollection { Id = ... } sets that propery as null so DocumentsLink is trying to use null.

How should I solve it? And why can't us give the collection URI with UriFactory instead of the DocumentCollection instance?

@felschr
Copy link
Owner

felschr commented Jan 8, 2019

Are you using the 2.0 beta release?
The current stable release doesn't support DocumentDB SDK 2.0+.

@rhalaly
Copy link
Author

rhalaly commented Jan 8, 2019

Yes, I'm using 2.0-beta4

@nsrcraiga
Copy link

Hello, I am receiving this same error. I am using .NET Core 2.0 and the 1.0 stable release of AspNetCore.Identity.DocumentDB.

@GaetanoSiano
Copy link

Did anyone resolve this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants