Configuring IoC with MongoRepository

Please post some examples on how we should configure IoC containers using MongoRepository.

Actually i'm trying with Autofac Container, registering like this:

builder.RegisterType<MongoRepository<IEntity>>().As<IRepository<IEntity>>().InstancePerLifetimeScope();
//or like this
builder.Register(x => new MongoRepository<IEntity>()).As<IRepository<IEntity>>().InstancePerLifetimeScope();

but i got an exception that states the
Database Parameter is null in the Default Constructor that takes the connection string from the Web.Config, without specifying a database, and when specifying the database i get:

Object reference not set to an instance of an object.

Using this connection string: "mongodb://localhost:27017/local?safe=true"