Contents tagged with WCF

  • Fix: WCF - The type provided as the Service attribute value in the ServiceHost directive could not be found

    I wanted to expose some raw data to users in my current ASP.NET 3.5 web site project. I created a subdirectory called ‘datafeeds’ and added a WCF Data Service. I wired the dataservice up to the Entity Framework class and, on running the ItemDataService.svc file, was greeted with:

    Read more...

  • Silverlight 2 Data Form - Episode 6: "C" is for Create

    In this episode, you build a XAML form that acts like a popup, modal window. The form validates user input with WCF callbacks to ensure that the customer ID is unique. By the end of the episode, you're able to add a customer to the NorthWind database using Silverlight, VB, ADO.NET Data Services and the Entity Framework.

    Here's a reminder: this series is sequential. If you haven't worked through the first five episodes, you'll find this one tough sledding because of the prerequisites.

    BTW, if you think these screencasts are worthwhile, let me know?

    Ken

    Read more...

  • Learning CRUD and Data Forms in Silverlight 2 (Screencasts)

    Not much stuck with me from years of Latin in high school, but the motto “Docendo discimus” has always served me well. “We learn by teaching” expresses one of my motivations for writing tutorials and creating presentations on the latest Microsoft technologies. The best way for me to grasp Silverlight 2 was to commit to an article or talk and then jump in head first to start figuring it out.

    The ‘sink or swim’ approach leads to another observation: when a product is new, and documentation is sparse, what you need to know before you can do something, you learn by doing it. In other words, you muddle through and end up with valuable knowledge that you can share.

    I was fascinated by the possibility of using Silverlight 2 as an alternative to ASP.NET business applications. The examples I found were either incomplete (didn’t actually save data) or over-engineered to be incomprehensible (by me, at least). So, I decided to build my own prototype and offer my learnings up as a series of screencasts.
     
    The demo project is a small, but realistic example of how to create a CRUD (Create, Read, Update, Delete) application against the familiar Northwind database. It uses the latest stuff from Microsoft including Windows Communication Foundation, ADO.NET Data Services (Astoria), and the Entity Framework. 

    Note to language bigots: I wrote the sample and screencasts in Visual Basic.  There were several reasons: I’m more comfortable in VB (although I write lots of C#); there’s a dearth of sample Silverlight code in VB; and people who write only in C# don’t need beginner-level content because they already know everything. <grin>
     
    I'm sure people will report more "correct", elegant, and efficient ways to create the application, and that's fine by me. The goal is to learn Silverlight 2 data handling, and I'm still learning too. I expect to add an episode on fixing the bugs. <grin>

    I've put the first two episodes online today, using Microsoft's wonderful free Silverlight Streaming as the host. The remainder of the screencasts (probably a total of eight) will appear by the end of next week.
     
    Here are the first two episodes:
     
    Silverlight 2 Data Form - Episode 1
    Silverlight 2 Data Form - Episode 2

    You'll need these resources to follow along with the screencasts.

    I hope you’ll profit from my adventure and judge for yourself whether Silverlight 2 is ready for a business application. I’ll be interested to hear your thoughts as feedback in the series' forum.

    Read more...

  • LINQ and WCF Services

    My friend Kirk has a very interesting post that uses LINQ to turn an XML RSS feed into a JSON service using WCF. (Wow, this is acronym heaven!)

    The piece has good information about techniques using .NET 3.5  including LINQ to XML (including XDocument) and something in System.ServiceModel.Syndication called WebGet.

    I'm still trying to get my head around using LINQ in (Web) services, so this is great.

    Read more...