Windows Phone 7: Custom Tool Error failed to generate code for service reference

Stumbling here because you are having trouble updating a service reference in your Windows Phone 7 application? Are you getting a warning that reads something like this? Custom tool warning: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: Could not load type ‘System.Runtime.Serialization.DataContractSet’ from assembly ‘System.Runtime.Serialization, Version=,… Read More »

SharePoint 2010: Programatically Retrieve Credentials from the Secure Store Service

SharePoint 2010’s Secure Store Service provides a way to map credentials and delegate access to remote resources. You may already be familiar with the MOSS 2007 Single Sign-on Shared Service, which was the former equivalent. The Secure Store Service integrates seemlessly with Business Connectivity Services (BCS), but it also features an API that can be… Read More »

Linq to Entities Wild-card LIKE Extension Method

To build a wildcard-enabled Linq query for Entity Framework, you have several methods available to use from the System.String class that Entity Framework supports and transforms into SQL: Contains(string value) StartsWith(string value) EndsWith(string value) A simple query example might be: var q = (from c in db.Customers where c.CompanyName.Contains(name) select c) .ToList(); The above example… Read More »

Avoiding SOAP Bloat with JSON Services

In this post I am going to walk through writing and consuming JSON services using ASP.Net, WCF, and jQuery to request the stock price for a company. Visual Studio 2010 Web Application Project Template Additions jQuery Intellisense – let Visual Studio write your jQuery for you AJAX-enabled WCF Service – item template that auto-generates the… Read More »