WCF

WCF WebSockets: First Glance

January 13th, 2011 / David Padbury » lab49

I finally got around to playing with the first drop of WebSockets support for WCF. I’m pretty familiar with WebSockets as I’ve been using Node.js to play around with them for quite a while now. The server API in Node.js is wonderful as it couldn’t be simpler – to demonstrate this, take a look at how we’d create a basic echo server.

var ws = require("websocket-server");

var server = ws.createServer();

server.addListener("connection", function(connection){
  connection.addListener("message", function(msg){
    server.send(msg);
  });
});

server.listen(8080);

Minimal WCF and REST (or whatever else you might want)

January 4th, 2011 / Pelebyte » technology

The original versions of WCF were great if you wanted to expose SOAP-RPC endpoints with predefined methods driven off of reflection in your code, but as developers in the .NET space move to join the rest of the world with REST and general HTTP services that aren’t quite so static as SOAP-RPC, where does that leave WCF?

Here is a minimalist version of a standalone WCF service—no XML in app.config or web.config, no IIS, no generated classes—just a copy-pasteable example of getting a minimal arbitrary HTTP server up and running in WCF. Note that this code requires .NET 4.0 because it uses the new ByteStreamMessageEncodingBindingElement class to allow for tighter control over the serialized output.

PowerShell Hacker #8

July 3rd, 2010 / Development in a Blink

I am ready for the long 4th of July weekend. Rumor has it, folks visiting/transplanted from England spend the day indoors with the shades drawn looking at pictures of the Queen.

First a few PowerShell links.

PowerShell Editors and my Expand-Alias Function Don Jones [MVP] does a PowerShell Editor Roundup and Shay Levy [MVP] uses the PowerGUI SDK to port my Expand-Alias code
PowerShell cmdlet New-WebServiceProxy and WCF A version 2 feature that creates a Web service proxy object that lets you use and manage the Web service in Windows PowerShell.

Here is a follow up on the version 1 approach and using PowerShell with WCF

Tracking My Internet Provider Speeds

April 10th, 2010 / Scott Weinstein on .Net

Of late, our broadband internet has been feeling sluggish. A call to the company took way more hold-time than I wanted to spend, and it only fixed the problem for a short while. Thus a perfect opportunity to play with some new tech to solve a problem, in this case, documenting a systemic issue from a service provider.

The goal – a log a internet speeds, taken say every 15 min. Recording ping time, upload speed, download speed, and local LAN usage.

 

The solution

  • A WCF service to measure speeds

WCF WebHttp Services in .NET 4

January 24th, 2010 / Development in a Blink

Introducing WCF WebHttp Services in .NET 4

Have your used WCF 3.5 or the WCF REST Starter Kit to build non-SOAP services?

WCF WebHttp Services is the vehicle that brings these technologies forward to .NET 4.

New to WCF or have only used WCF for building SOAP-based services, this series of blog posts will bring you up to speed quickly.z

Use SQL Server Modeling to build a DSL for .NET 4 WCF content-based routing service

December 5th, 2009 / Development in a Blink

Doug Purdy posts Model-Driven Content Based Routing. The sample includes a DSL, a Runtime and more

This a great example that leverages many of the different aspects of SQL Server Modeling (”M”-based DSLs, “M”, Modeling Services, etc.) to enable a better experience around application development/management

Here is the MSDN Code Gallery sample RouterManager for WCF in .NET 4 using SQL Server Modeling CTP.

RouterManager is a domain-specific language and runtime that allows you to program the rules for the .NET 4 WCF content-based routing service using an easy to understand language.

404 NotFound strikes back

November 3rd, 2009

I have a Silverlight application consuming a WCF service. And as you may know WCF errors are not serialized on the Silverlight side and all you get is generic NotFound error.

I was experiencing the error only in certain rare cases.
Everything seemed fine in the WCF side, no exceptions were thrown in my service contracts.

I fiddled with the Fiddler but that did not capture anything.

I fixed the issue purely by  divide/conqure method. Turns out I was passing an object with an enum type property, but was never setting that property. The debugger showed that the value of the enum property was the first item in the enum as one would expect.
However, when I explicitly set the property it all started to work!

Creating high performance WCF services

January 3rd, 2009 / Scott Weinstein's .net blog

I had a WCF service where I wanted to be able to support over a hundred concurrent users, and while most of the service methods had small payloads which returned quickly, the startup sequence needed to pull down 200,000 records. The out of the box WCF service had no ability to support this scenario, but with some effort I was able to squeeze orders of magnitude performance increases out of the service and hit the performance goal.


Initially performance was abysmal and there was talk of ditching WCF entirely ( and as the one pushing WCF technology on the project this didn’t seem like a career enhancing change )

How To Pass LINQ To SQL Data Over WCF

April 4th, 2008

In scenarios where there is a need to retrieve data from a remote service, a programmer is usually faced with an additional task of manually defining a data structure (e.g. a class) that would hold the information returned. For example, data stored in a database table may be retrieved using either data reader or a data adapter and placed in a collection of custom objects, or even a DataSet.

With WCF, an object returned from a service must be serializable. In addition, it should use the new [DataContract] style serialization optimized for WCF, instead of the old fashioned [Serializable] one.