December 5, 2011
By default, whenever you have VS2010 generate a new unit test for a web method (an MVC controller in my case), it creates a hard-linked file path in the "AspNetDevelopmentServerHost" attribute. This may work fine if you’re the sole developer and code on only one machine, but what about when you work on a team or have multiple machines that will invariably have different file structures? MS recommends using "%PathToWebRoot%", but at least in my case, it always resolves to the default Visual Studio project folder in your User directory. Thankfully, you can also use the "$(SolutionDir)" macro, which should resolve to your project directory, wherever that may be. Thanks to Jason Skowronek for that tip.
–Adam
September 18, 2011
Quick tip: if you’re getting errors (e.g. instant disconnect or won’t connect) when connecting to your mac through VNC, try the following:
-
Be sure to specify a password under "computer settings" on your mac.
-
Set the "color level" to full (all available colors) on your VNC client. In RealVNC, these can be found by clicking on the options button.
Thanks to Dundz at the macosx.com forums.
–Adam
Filed under:
Tips by acarter
July 13, 2011
If you’re trying to modify the property of an object automagically generated from RIA Services within a Silverlight application and you’re getting a runtime error indicating that the the property is read only, here’s a simple fix. Simply add the attribute “[Editable(true)]” from System.ComponentModel.DataAnnotations at the top of the field that you’d like to be editable.
Is it just me or are the number of attributes needed to be placed before each property getting a little ridiculous?
–Adam
May 10, 2011
When working through the Movies tutorial on the ASP.NET website, I decided that it’d be fun to try to switch the data provider from SQL Compact to the full version of SQL Server 2008. In preparation for the move, I created a new (blank) database and gave the appropriate permissions to my test account. However, after altering my connection string to accommodate SQL Server 2008, I received the following message:
Invalid object name ‘dbo.Movies’.
At first, I thought that my connection string was off, but it turns out that for Entity Framework to automagically create database tables and relationships, the database must not already exist. As such, simply deleting the blank database completely fixed the problem. This, of course, means that your SQL Server user must have db create privileges, which is something that I don’t grant my test account. To get around this, use more powerful credentials for the initial connection that creates the database. Afterwards, you can switch to a more restricted login.
–Adam
February 23, 2011
Can’t seem to find your serial number on your new-ish Dell UltraSharp monitor? On older versions of the UltraSharp line (and probably other Dell monitors), the serial number could always be found on the back of the panel. As it turns out, Dell got fancy with newer models and is now placing the serial on a slide-out card on the left side of the monitor. See the pictures below:

–Adam
Filed under:
Tips by acarter