The underlying connection was closed: The connection was closed unexpectedly

If you’re attempting to return a LINQ to SQL object using a WCF service and are getting this error, what’s really happening is that .NET can’t serialize your object. This occurs when your LINQ to SQL objects contain circular references (example: customer points to an order, order points back to customer). To get around this, open your data context and in the properties window of the visual designer, set the “Serialzation Mode” option to “Unidirectional”. Thanks to Rick Stahl for his post on the subject.

–Adam

Recognizing Network Cards During Windows Home Server Restores

If you attempt to restore a PC on your Windows Home Server network only to discover that the WHS restore CD doesn’t recognize your network card, here’s an easy fix. All you have to do is put the network driver for Windows XP onto the root level of a flash drive and have the WSH wizard “search” for additional drivers.

If you read the WHS help wizard, you’re lead to believe that all you have to do is copy some magical “Windows Home Sever Restore Drivers” folder onto your flash drive. What the help doesn’t tell you is that this only works if your PC is running XP. The reason behind this is that the WHS restore wizard is based on a 32-bit OS (I’m assuming XP or Server 2003). Therefore, Vista/7 drivers (either 32 or 64 bit) won’t be recognized during the restore process.

–Adam