Silverlight 4 101: Debugging WCF RIA Services

By default, he error messages that are generated from WCF RIA Services are less than useful. They are often generic messages that do little to help you understand the root of the problem. Fortunately, there is a great tool, called Fiddler ( that provides solid, detailed information on your errors. After downloading and installing Fiddler, do the following: 1. Open your Web project’s web.config file and look within the <system.serviceModel> node to make sure the following <serviceBehaviors> node exists beneath the <behaviors> element: <system.serviceModel>  <behaviors>    <serviceBehaviors>      <behavior name=“WCF_ReaderQuotaIssue.Web.ServiceBehavior”>        <serviceMetadata httpGetEnabled=”true”/>        <serviceDebug includeExceptionDetailInFaults=”true”/>        <dataContractSerializer maxItemsInObjectGraph=”6553600″/>      </behavior>    </serviceBehaviors>  </behaviors> 2. Launch Fiddler. … Continue reading Silverlight 4 101: Debugging WCF RIA Services

Getting your Silverlight Assemblies to Appear in the VS 2010 Add References Dialog

If you are creating custom Silverlight assemblies you want to reference from multiple projects, it’s great for those assemblies to appear in Visual Studio’s Add References dialog. It’s easy to do this, although I didn’t see documentation anywhere on how to do it. All you need to do is add a key below the following Windows Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Silverlight\v4.0\AssemblyFoldersEx or for 64-bit Windows machines: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Silverlight\v4.0\AssemblyFoldersEx Simply add a new key with a name that is descriptive of your assembly, then set the default value of the key to the folder that contains your .NET assembly. For example, if your … Continue reading Getting your Silverlight Assemblies to Appear in the VS 2010 Add References Dialog

Getting a project’s GUID

OK, this was much harder than it should have been. I was in the process of creating my own custom Silverlight project templates (I don’t consider the default template usable since it requires you to put your business entities in the host web project!). Anyway, the host web project needs to get a reference to the Silverlight project–specifically the project’s GUID. Here are the steps you need to take to get this information: Install the Visual Studio 2010 SDK: Add these assemblies to your project: – Microsoft.VisualStudio.Shell.Interop– Microsoft.VisualStudio.OLE.Interop Now you can use the following code to retrieve a project’s … Continue reading Getting a project’s GUID