THINK

that’s how i naturally know

Archive for the ‘WCF’ tag

WCF Gotcha: Windows Service cannot start because ServiceMeta HttpGet is true

leave a comment

When using WCF + Windows Service + net.Tcp binding, ServiceBehavior > ServiceMeta > HttpGet must be set to false. It normally defaults to true when first created in WCF Configuration Editor. The fastest way to get rid of it is to edit the App.config XML directly, deleting the related <serviceMeta> tag.

Written by Jake

December 19th, 2011 at 11:17 am

Posted in Programming

Tagged with

WCF Tutorial: WCF Service with Windows Service (Part 3 of 3)

leave a comment

Just a stub

Creating Service Contract
Creating DataContract
Creating FaultContract

Creating Windows Service Host
Creating Proxy
Creating Client

Creating app.config with WCF config Editor in Microsoft Visual Studio 2010
Installing/Uninstalling/Starting/Stopping Windows Service Host with sc.exe
Use client to connect proxy to host, and consuming services.

Programatically configure service and proxy using and without using app.config

Concepts beyond: Port sharing, IIS hosting, behaviors, tracing, message logging, using MSVS tools to do Metadata extraction.

Written by Jake

December 7th, 2011 at 2:55 pm

Posted in Programming

Tagged with ,

WCF Tutorial: WCF jargon (Part 2 of 3)

leave a comment

Just a stub:

Service
Host
Endpoint
Binding
Metadata
Behavior
Protocol

Tracing
Message
Fault

Proxy
Client

Written by Jake

December 7th, 2011 at 2:47 pm

Posted in Programming

Tagged with ,

WCF Tutorial: WCF Overview (part 1 of 3)

leave a comment

Just a stub first:

WCF is Windows Communications Foundation
By default, it sends message using SOAP protocol by serializing data structures into XML.
For serialization, it specifies the DataContract and DataMember attributes.
For Interface programming, it specifies the ServiceContract and OperationContract attributes.
For Error and Exception handling, it specifies the FaultContract attribute.

Language agnostic (the only thing fixed is SOAP) such that JAVA or other apps can consume the services.
Hide implementation and expose only interface specific faults (as oppoosed to Exceptions)

A WCF service is typically compiled as an independant DLL that can be hosted by one of several methods i.e. IIS, Windows Service or Self-hosted e.g. in a WinForms application, WPF application.

The Microsoft .NET 4.0 framework with Microsoft Visual Studio 2010 provide some magic code and convenient designer UI to build both the WCF service and the client.

Written by Jake

December 7th, 2011 at 2:44 pm

Posted in Programming

Tagged with ,