diff --git a/BsonLibrary/Properties/AssemblyInfo.cs b/BsonLibrary/Properties/AssemblyInfo.cs index 3c8c6bef8e..300619ac7f 100644 --- a/BsonLibrary/Properties/AssemblyInfo.cs +++ b/BsonLibrary/Properties/AssemblyInfo.cs @@ -47,4 +47,4 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.5.0.3936")] +[assembly: AssemblyVersion("0.5.0.*")] diff --git a/CSharpDriver/Core/MongoDatabase.cs b/CSharpDriver/Core/MongoDatabase.cs index 2f187255b3..17e46154a3 100644 --- a/CSharpDriver/Core/MongoDatabase.cs +++ b/CSharpDriver/Core/MongoDatabase.cs @@ -328,13 +328,14 @@ namespace MongoDB.CSharpDriver { if (name == null) { throw new ArgumentNullException("name"); } - if ( - name == "" || - name.IndexOfAny(new char[] { '\0', ' ', '.', '$', '/', '\\' }) != -1 || - name != name.ToLower() || - Encoding.UTF8.GetBytes(name).Length > 64 - ) { - throw new ArgumentException("Invalid database name", "name"); + if (name == "") { + throw new ArgumentException("Database name is empty"); + } + if (name.IndexOfAny(new char[] { '\0', ' ', '.', '$', '/', '\\' }) != -1) { + throw new ArgumentException("Database name cannot contain the following special characters: null, space, period, $, / or \\"); + } + if (Encoding.UTF8.GetBytes(name).Length > 64) { + throw new ArgumentException("Database name cannot exceed 64 bytes (after encoding to UTF8)"); } } #endregion diff --git a/CSharpDriver/Properties/AssemblyInfo.cs b/CSharpDriver/Properties/AssemblyInfo.cs index 672f3b89bc..12a6d1eaac 100644 --- a/CSharpDriver/Properties/AssemblyInfo.cs +++ b/CSharpDriver/Properties/AssemblyInfo.cs @@ -47,4 +47,4 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.5.0.3936")] +[assembly: AssemblyVersion("0.5.0.*")]