Monday, January 14, 2008

People Search Box Error

I was trying to work out why an error was being thrown from a SharePoint 2007 web part today, that extends peoplesearchboxex.cs. The error was the wonderfully helpful "Object reference not set to an instance of an object" exception, being thrown from the base method, PeopleSearchBoxEx.CreateChildControls().

After a lot of messing around, it turns out the error was thrown because of some invalid data in the "Properties" web part property. I removed the data in there and it worked correctly.

This is some pretty disappointing error reporting, considering how likely it is that configuration data could be incorrect.

Labels: , , , , , , ,

Sunday, August 05, 2007

SQLMetal Error

I am currently playing around with Linq to SQL, and I am using sqlmetal.exe to generate an external xml mapping file for my database.

After installing Visual Studio 2008 beta 2, running my sqlmetal command (which in the previous version had been running without a problem) returned the following message:

error The user instance login flag is not supported on this version of SQL Server. The connection will be closed.

After playing around a bit, I discovered that changing the /database value from "localhost" to the actual name of my PC fixed the problem.

Labels: , , , , , , , , ,