Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion "Attempted to read past the end of the stream" when authentication enabled
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Robert Stam  
View profile  
 More options Feb 21 2012, 6:11 pm
From: Robert Stam <rob...@10gen.com>
Date: Tue, 21 Feb 2012 17:11:22 -0600
Local: Tues, Feb 21 2012 6:11 pm
Subject: Re: [mongodb-csharp] Re: "Attempted to read past the end of the stream" when authentication enabled

I'm about to be offline for the next 48 hours, but one of my colleagues
will take a look at this.

On Tue, Feb 21, 2012 at 4:44 PM, Senor Cardgage <combolati...@gmail.com>wrote:

> If I use my ip address in the connection string like this, for
> example:

> "mongodb://admin(admin):adminp...@77.201.199.87"

> the connection works properly, but if I use "localhost" or "127.0.0.1"
> like this:

> "mongodb://admin(admin):adminpass@localhost"

> then it fails

> On Feb 21, 12:06 pm, Senor Cardgage <combolati...@gmail.com> wrote:
> > Here is a function that replicates the issue:

> >         private void checkCollection(string un, string pw, string
> > dbName, string collectionName)
> >         {
> >             string cs = string.Format("mongodb://{0}:{1}@localhost:
> > 27017/{2}", un, pw, dbName);
> >             MongoServer srv = MongoServer.Create(cs);
> >             try
> >             {
> >                 srv[dbName].CollectionExists(collectionName);
> >             }
> >             catch (Exception ex)
> >             {
> >                 MessageBox.Show(ex.Message);
> >             }
> >         }

> > On Feb 21, 10:40 am, Senor Cardgage <combolati...@gmail.com> wrote:

> > > On Feb 21, 10:36 am, Robert Stam <rob...@10gen.com> wrote:

> > > > Not sure where you are seeing this error. Can you provide a full
> stack
> > > > trace?

> > > > On Tue, Feb 21, 2012 at 11:24 AM, Senor Cardgage <
> combolati...@gmail.com>wrote:

> > > > > When I enable authentication, I get the error "Attempted to read
> past
> > > > > the end of the stream"

> > > > > Here is the command line I use to register the mongo service:
> > > > > "C:\mongo\bin\mongod" --reinstall --auth --dbpath
> "c:\mongo\data\db" --
> > > > > logpath "c:\mongo\logs" --profile=2

> > > > > here is my connection string:

> > > > > "mongodb://admin:adminpass@localhost"

> > > > > Everything works properly when "--admin" is excluded from the
> command
> > > > > line and "mongodb://localhost" is used for the connection string.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.