[CSHARP-2010] System.IO.EndOfStreamException: Attempted to read past the end of the stream. Created: 03/Jul/17  Updated: 13/Oct/17  Resolved: 13/Oct/17

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Fatih Erol Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Microsoft Windows 10



 Description   

I'm getting this error.But it is not always("sometimes").
This my example connection string
"mongodb://<username>:<PASSWORD>@cluster0-shard-00-00-flm5h.mongodb.net:27017,cluster0-shard-00-01-flm5h.mongodb.net:27017,cluster0-shard-00-02-flm5h.mongodb.net:27017/<DATABASE>?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin"

"An EndOfStreamException is thrown:
MongoDB.Driver.MongoConnectionException: An exception occurred while receiving a message from the server. ---> System.IO.EndOfStreamException: Attempted to read past the end of the stream."



 Comments   
Comment by Craig Wilson [ 05/Jul/17 ]

Hi Fatih,

Sorry you are having trouble. Couple of questions:

What version of the driver are you using? (I see you mentioned 2.4.4, but we haven't released that version – typo probably)
What version of .NET are you using?
Could you share the full stack trace?

Is there a particular operation you are performing that results in this error? Could you share the code around it?

Thanks,
Craig

Generated at Wed Feb 07 21:41:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.