VS 2008 debug Script Documents

A really annoying issue that can arise in VS 2008 if your attempting to debug a site with a lot of javascript (which comes for free with the AJAX toolkit ;) is you get a new node in the solution explorer detailing each little piece of javascript that is loaded just in case you need to debug it. This is great and all but it looks like nobody tested this with a production size site because anything more than a small amount of JS and it slows to a crawl.

There does not appear to be a solution in VS 2008 for this, you are basically back to hacking the registry to disable script debugging.

Open a command prompt and type;

reg add HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /d {4FF9DEF4-8922-4D02-9379-3FFA64D1D639} /f

See here for more;


IPhone Dev Error: Program received signal: “EXC_BAD_ACCESS”. or “Failed to call designated initaializer on NSManagedObject class”

Symptoms: cryptic error message with a massive stack trace (65k+ stack frames)
This could be a memory leak, however, the cause in my case was i had named a property of a NSManagedObject object “description” in my Core Data data model. While “description” is a not technically a reserved keyword it is a method in NSObject which when used with Core Data causes problems.
Solution; rename the property to something else like desc.

see http://stackoverflow.com/questions/2222155/core-data-crashes-with-exc-bad-access-on-one-of-my-entities for more

IPhone Dev Error: “The model used to open the store is incompatible with the one used to create the store”;

You have probably changed the Core Data data model and are now trying to run your app in the simulator, however,, if you have already run it on the sim before then there will be data stored according to the old version of the data model. Quick solution: reset the simulator “IPhone Simulator > Reset Content and Settings” and try running your app again. Correct solution: look at versioning your data models.

Route traffic (smtp) through specific network interface

The problem; need to force connections to the gmail smtp servers through a mobile broadband modem rather than the main system NIC. The solution; use the route command to add a new persistent route to the IP routing tables for your machine;

route -p add mask XXX.XXX.XXX.XXX metric 1 if 14


  • is the gmail smtp server
  • XXX.XXX.XXX.XXX is the default gatway for the connection you want to route the traffic through
  • if 14 is the id of the NIC you want to use

See this article for more details  http://www.windowsnetworking.com/articles_tutorials/Making-Sense-Windows-Routing-Tables.html

SQL server management studio “locate backup” default path – when an unfinished feature becomes a bug

Any of you that use SQL server management studio will probably, at one time or another, have had reason to attempt to restore a database from a backup file. This relatively simple operation is made irritatingly difficult by the management studio user interface. While there are many things wrong about the UI for this particular task (principally too many clicks before you do anything useful) the biggest problem is that it does not save the path of the backup file you choose. When you open the locate backup dialogue it defaults to a directory within the SQL server install dir, to select the file you want to restore you have to navigate to wherever in your file system that file resides, you can’t type in the path you have to scroll and click your way there. This is just painful but the pain is compounded by the fact that (if you don’t just give up and go home but actually find the file that you want to restore) the next time you wish to restore a backup you are forced to navigate through the directory structure again. I think this is due to an unfinished feature in the management studio, the UI of the specify backup dialogue looks as if it should save the locations of backup files you have previously restored, unfortunately it does not so instead this unfinished feature results in a usability bug in the locate backup dialogue.

The solution (or a kind of solution I should say) is to edit the registry entry that records the path the locate backup file dialogue defaults to;

My Computer\HKEY_LOCAL-MACHINE\SOFTWARE\Microsoft\\Microsoft SQL Server\MSSQL.1\MSSQLServer\BackupDirectory


Sony MDR-NC500D Digital Noise Cancelling Headphones – Review

I have been in the market for a pair of noise cancelling headphones for a while but didn’t make the jump and buy a pair until about a month ago. I had been looking for a while at the Bose QuietComfort 2 and 3 and had tried them out briefly several times (I preferred the Over the ear QuiteComfort 2 to the on ear QuiteComfort 3) but each time while I was impressed by the noise cancelling and sound quality I just couldn’t justify the price. Then Sony released the MDR-NC500Ds which I got to try out while waiting for a flight in JFK, I liked the over the ear design, was impressed by the passive and active noise cancelling and the build quality but these were even less likely to attract my attention seen as they were initially priced at about 400 euro.

A couple of weeks back from the states I had another trip coming up and I decided to have another look on the web to see if anything got my fancy, initially I was only looking at the Bose but by accident I looked on Amazon to find that they were selling the Sony for 200 euro. http://www.amazon.co.uk/Sony-MDR-NC500-Digital-Cancelling-Headphones/dp/B00165TAVS/ref=sr_1_9?ie=UTF8&s=electronics&qid=1247251154&sr=1-9 Shall we just say my credit card didn’t stand much of a chance.

A month after receiving my shiny new Sony noise cancelling headphones and I have to tell you they are probably one of the best gadget purchases I have ever made. On flights they work as you would think filtering out all the background low level noise (Sony claim 99% but I would put it closer to 90%) you can still hear someone if they are talking directly to you and you will know when the captain is making an announcement but everything else becomes much quieter. It only becomes obvious how loud air travel is when you take the headphones off after wearing them for a while, all that low level noise comes back instantly and just makes you want to put the headphones on again.

While the use of the headphones on flights is what finally prompted me to buy, it’s their utility in the office that has prompted me to write a review. My job as a programmer requires me to be able to concentrate on difficult problems for considerable lengths of time, unfortunately I like many others work in a pretty noisy office environment surrounding by ringing phones, talking colleagues and noise servers which kind of hampers any kind of serious concentration. Maybe someday the programmers of the world will unite and demand personal offices as a prerequisite on all contracts thus consigning Dilbert land to the wastebasket of software history; however, until that day I have found a solution in the MDR-NC500Ds.

I am not overstating the case when I say that these headphones have changed the way I work utterly, my productivity has gone up by about 20%, I can cut out most of the rest of the world and I can concentrate for much longer periods allowing me to get into a state of flow which I could really only achieve previously by working from home. I used to say that dual monitors were an absolute must have for any programmer, I must now amended that to say that dual monitors and a pair of these headphones are the most valuable tools you can have in your toolbox. A quick summary of the good and the bad;

Good Points;

  • Cost has come down significantly
  • Excellent noise cancellation (both active and passive)
  • You don’t need to listen to music to enjoy the noise cancelling so reading etc is much improved
  • They are a perfect fit for me (see below)
  • I can wear them all day without a problem
  • The built quality and look is I think much better than the Bose
  • The sound quality is I think excellent (you will find some audiophile reviews that have some things to say about it but given where you will be usually using these headphones you won’t notice)
  • You get a raft of accessories
  • It’s got a large internal rechargeable battery I get several days use out of a single charge.


Bad Points;

  • Cost has come down but they are still not cheap
  • You need power so that you can listen to music, if the headphones run out then you can’t listen to music
  • The headphones are not small, and the case that comes with is very large (telephone book thick and about half the size)
  • They might not fit everybody, if you have a small head they might fall off.
  • Some people don’t like the over the ear headphones (I prefer them)
  • Some people don’t like the sensation produced by the active noise cancelling


In summary if you work in a noisy office environment these will help you get work done, but try and get a demo before you buy I found that about 50% of my friends either couldn’t wear them because they were too large or didn’t like the sensation produced by the noise cancelling.

Dell Latitude On Reader Password Problem

Just a few quick notes on the Dell Latitude On Reader program that Dell is now shipping with its Latitude range. First there is a significant difference between “Latitude On Reader” and “Latitude On”. Latitude On Reader is a software download you can get from the dell support site. Install it and, run the setup program that is installed (note this these are separate steps for some reason) and then if you have the Latitude On button in your laptop when you press the button you will be booted into the Latitude On Reader mini OS. Latitude On, however, appears to be a hardware component (a system on a chip) which when released by Dell will allow access to not just the email, calendar and contacts that you get with the Reader but also web browsing and some other goodies. Anyway enough about poor naming of Dells products and more about the title of the post. When you setup Latitude On Reader (and presumably Latitude On) you are asked to enter a password. Unfortunately you do this in the setup program which you run from windows using the keyboard configuration of the windows install. Can anybody see where this is going ;) The Latitude On Reader when asking for the password appears to ignore the keyboard layout of the main windows install and instead offers only the US keyboard layout which is a slight problem if you used another keyboard layout to enter the password and used (as everybody should) some special characters to make the password more secure. There may be some way to configure the correct keyboard layout in the Latitude On Reader however my limited searches have not turned up anything yet.

Visual studio generating health monitoring events

Had a real Homer Simpson moment this morning, when I started getting a whole load of health monitoring email messages from my web server saying the an application was shutting down, that we had a compile error and generally the web application was falling apart. After racing to load the site in my browser I was relieved but confused that the site was live and everything seemed ok. Then I looked at the health monitoring messages only to find that they were originating not from the IIS web server but from a colleagues development machine. What was happening was that we had setup the web.config file for the application in question to send health monitoring emails from an account on the web server. What I had not realised is that the web server included with visual studio is also capable of sending these health monitoring events, so when my colleague started working on the application visual studios web server started sending me emails about what my colleague was doing. This is not a major problem except that it can cause a few panic attacks and might lead to a real health monitoring message being ignored. The solution is to deactivate health monitoring when developing a site and only enable when deploying to the server.

ProfileCommon could not be found

Ran into this little one today, when trying to specify additional properties in an ASP.net profile. I had the following in my web.config file for testing before adding additional properties.






I was then getting a missing reference error when i tried to do;


ProfileCommon p = (ProfileCommon) ProfileCommon.Create(CreateUserWizard1.UserName, true);


The problem is that ProfileCommon is a generated class, compiled only after you insert the <profile> section into your web.config file. However, the class is only compiled if you specify and additional property in the properties section, if you do not then the class is not compiled. The correct entry for web.config is;






Check out http://msdn.microsoft.com/en-us/library/ms998317.aspx and http://weblogs.asp.net/scottgu/archive/2005/10/18/427754.aspx for more info on forms authentication and asp.net profiles.

Importing or linking an Access 2007 db to a SQL Server 2005 database over a network

  1. First make sure the database is setup to use SQL auth as above (note NT auth will work also but requires client to use user name and password of server)
  2. In access create a new db and import data from an ODBC db
  3. Create a “Machine DSN” not a FILE DSN (File DSN is the default) see http://support.microsoft.com/kb/327268
  4. Select the tables you want to import or link to
  5. If access cannot identify a key field in the tables it will offer you the opportunity to create one (not necessary)
  6. Note foreign key relationships between tables will not be imported and must be manually re-entered, but can be saved without affecting the SQL server if using linked tables (good news is the relationships remain even after a refresh of the linked tables)

(a tip if you want to use linked table so that users can see up to the minute data without having to import but don’t want the users to modify the underlying SQL server db then when creating the SQL server login about and applying user mapping, choose to only allow the user to read the specific database and not to have write privileges)

%d bloggers like this: