Contents tagged with WCF

  • ChannelFactory, IDisposable and Handling Faults

    In my last post (Poor Man's Publish-Subscribe WCF Service) I used the ChannelFactory to build a communication channel that I could use to call a WCF service. There's something about that implementation that I wanted to explain in more detail. Notice the try-catch block surrounding the using statement: Continue reading...

  • Poor Man's Publish-Subscribe WCF Service

    I'm going to describe a WCF implementation of a publish-subscribe pattern that is used here at a medium-sized organization where I'm a lead developer. For reasons I won't go into MSMQ and the cloud were not options for us. Yet we needed durability, reliability, and all of the goodness that comes with a service bus. So we rolled our own "poor man's" pub sub (or observer pattern) service a simplified version of which I'll describe here. Continue reading...

  • WCF 4

    You no longer need to describe in detail all of the configuration for endpoints, bindings and protocols. For example, if you wipe out your web.config then basicHttp protocol is used by default. Also, and this is obscure, by default WCF 4 will act as a protocol bridge. If the client request is SOAP 1.1 but the back end service is SOAP 1.2 the bridge will transform the message automatically, which is transparent both to the client and service. In effect then the client can be an old skool app speaking SOAP 1.1 in http and the back end service can be SOAP 1.2 in tcp and no additional endpoints need to be configured. You do need to create a RoutingService to support routing behavior. Continue reading...

  • Microsoft PDC09 Keynote Address

    Microsoft announced the new bits at PDC keynote today. The theme? Cloud, cloud, and more cloud. The Azure platform goes into production on Jan 1. In beta through the next several months are new cloud platform tools: AppFabric (previously code named "Dublin") and Endpoint. From what I understand AppFabric provides a unified hosting environment for WCF and Workflow, SQL Azure database caching, and can be configured right in IIS. Endpoint seems to be a discovery service for web services all over the world. You can search it and get all the information you need to consume that data in your application. It probably uses the REST protocol. Microsoft showed a pretty cool demo with the NASA web service that involved showing 3D landscapes of pictures taken by the Mars Rover. You could do a serious mashup in a .NET app with Endpoint. Continue reading...

  • IIS 7 Non-HTTP Protocol Support

    More fun with WCF. Out of the box IIS 7 supports the HTTP protocol only. To configure named pipes, TCP, or MSMQ you must use the IIS configuration tool appcmd.exe located in %windir%\system32\inetsrv. (The command-line tool updates the %windir%\system32\inetsrv\config\applicationHost.config file.) For example, if tcp runs over port 808 and my web server's windir is c:\windows then the command to enable tcp is: Continue reading...

  • Windows Vista Port 8000

    Port 8000 is not open in Windows Vista except when running as a system administrator. And so with User Account Control (UAC) enabled, you cannot navigate to http://localhost:8000 or run self-hosted WCF Services without opening the port. To open for your user account, open a command prompt (running as Administrator) and invoke the netsh utility: Continue reading...