Wednesday, 22 September 2010

MongoDBViewer release

I wrote the MongoDB viewer (Ok, I wasn't very original with the name) to help me check document entries while working on the ossAccounts project.

I even put it on SourceForge more for completeness than ever expecting anyone to download it.

However, I am pleasantly surprised to find it now has over 200 downloads. How many are actually using the system I don't know but at least I've not had anyone complaining (yet).

While it is pretty basic (it is a dev tool after all) it more or less does the job it was designed for.

Hopefully this latest release will address the only issue I am aware of, namely that it would fail to display a documents data if a field held a null value (which is quite easy to do in MongoDB).

In a fit of enthusiasm I have even raised its Trove entry to Beta (from Alpha).

(Information about the MongoDBViewer can be found here).

Friday, 30 July 2010

The new kindle is here, well almost!

While I prefer a book with pages and dropping an ebook reader in the bath would spoil anyone's relaxing soak the new Kindle looks pretty good and the price is way better than an iPad (yes I know you can do so much more on an iPad like, well browse dull sites and read email).

So should anyone wish to buy me one (they are pre-order for the end of August) here's a link!



Wonder if I could get my son to do without a birthday this year...

Wednesday, 7 July 2010

Case sensitive URLs? It can't be...

but it is!

I am crawling my way to completing a basic web site for the ossAccounts and MongoDBViewer projects when I found a broken link.

The link in question goes to the MongoDBViewers download page on SourceForge which I had typed in as

http://sourceforge.net/projects/MongoDBViewer/files/

The capitalisation on the project name being habit to make it easier to type.  However this causes a site not found error. It turns out that it is the case which seems to have made Expression Web have a fit.

Replacing the three capitals to lower case (http://sourceforge.net/projects/mongodbviewer/files/) makes it work again!

Since I am sure urls are not case sensetive and I have used the capitalized version elsewhere on the site (I tried copying one that worked for the forum and had the same result) and that the links shown here work fine I am guessing this is some odd error in Expression Web 4.

Bring back FrontPage all is forgiven.

Friday, 21 May 2010

Using the Norm.BSON Serializer for testing with MongoDB.



By adding the following code to your MongoDocument base class and adjusting the protection of the Norm BsonSerializer from protected to public...

using Norm.BSON;
public byte[] Serialize()
{
    Return BsonSerializer.Serialize(this);
}

You can then make use of the resulting byte array to compare any two documents.

Expect(Document1.Serialize().SequanceEqual(Document2.Serialize),Is.True)

or maybe add a method to your document base class such as...

public bool BSONSequanceEqual(IMongoDocument obj)
{
   if (obj == null)
   {
     throw new ArgumentNullException("obj");
   }


   return this.Serialize().SequenceEqual(obj.Serialize());
}

Theoretically (I believe) this could then be used to override the equals,==,!= operations if required (but I have not tested this!).

Tuesday, 6 April 2010

Error 0x8007000b when running a new build.

If you get this error...
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
Check if you are building a default, any processor application on a 64bit system that wants to access 32bit library. The system looks for a 64bit library not your required 32bit library.

Quick solution is to tell the system to create a 32bit app instead of the default.

Monday, 22 March 2010

Using (Fluent) NHibernate with VS2010 and unit test deployment turned on.

If you get an error from the system looking for the NHibernate.ByteCode.Castle and don't seem to be able to work out how to get VS to add the missing dll try the following...


    [TestClass]
    public class DatabaseInitialise
    {


        [TestMethod]
        [TestCategory("Database")]
        public void Initialize()
        {
            // Deleted details not relating to this post.


            var dummyValue = new NHibernate.ByteCode.Castle.ProxyFactory();
        }


    }

This makes the compiler believe that the dll is actually used in the test project and therefore copies it over.

If you have a better way of doing this please feel free to let me know!

Thursday, 11 March 2010

Groupwise - Testing a specific internet agent

Extract from the GroupWise Manual...


Testing the Internet Agent

After you've started the Internet Agent, you should send a message to ensure that the system is working properly.
To send a message:
  1. Open a new mail message in your GroupWise client.
  2. In the To field, enter your Internet address using the following syntax:
    internet_agent:"user@host" 
    where internet_agent is the Internet Agent's name. For example:
    gwia:"rcollins@novell.com"
  3. Send the message and check your mailbox to verify that you receive it.

Thursday, 18 February 2010

Adding Windows 2008 R2 server as Domain Controller to a windows 2000 network.

Some notes relating to the above:

Running adprep on your windows 2K domain controller

Firstly I suggest reading this by Daniel Petri.

Then when you realise that you cant get a 32bit copy of Windows 2008 R2 refer to the following gem from this far eastern (it looks like) TechNet document...
In Windows Server 2008 R2, Adprep is 
available in a 32-bit version and a 64-bit version. The 64-bit version runs by default. If you need to run Adprep on a 32-bit computer, run the 32-bit version (Adprep32.exe).

Wednesday, 27 January 2010

System.Data.SqlClient.SqlException (0x80131904): Login failed for user

If you are trying to login into a MSSQL database using a SQL account code (SQL server authentication) and not a windows account and are getting this error when you are sure the account and password are correct; try checking the 'Server Authentication' setting on the server and make sure it allows both types of access.