Pablo M. Cibraro (aka Cibrax)

My thoughts on Web Services and .NET development

  • SO-Aware is here. A RESTful service repository

    I am very proud to announce today the release of our product in Tellago Studios, SO-Aware, a RESTful service repository based on OData.  The main difference between SO-Aware and other existing products is that everything is exposed as resources via OData feeds that can be retrieved or manipulated with standard http verbs like POST, PUT, GET or DELETE (All this is implemented with WCF data services).

  • Specifying mime types for content in WCF Data Services

    WCF Data Services provides an specific operator “$value” for retrieving the underline value of any of the properties in exposed resources. Let’s say you have a resource “Configuration” that exposes a field “Xml” whose content should be treated as a mime type “text/xml”. When you execute a query like this to retrieve the value of that field, “myService.svc/Configurations(1)/Xml/$value”, what you get is the content of that field but expressed as plain text (text/plain). This happens because the default behavior for WCF Data Services is to return most of the primitive types as “text/plain” and some others like byte arrays as “application/octet-stream”. So, how do you change that default behavior to retrieve property content with other mime types ?. Here is where the MimeTypeAttribute can be used to change that behavior.

  • Professional WCF 4.0: Windows Communication Foundation with .NET 4.0

    The book in which I been working on since last year finally went to the light this week. It has been the result of hard work between me and three other Connected Systems MVP, my friend Fabio Cozzolino, Kurt Claeys and Johann Grabner. If you are interested in learning the new features in WCF 4.0, but also WCF in general and how to apply it in real world scenarios, this book is for you. I dedicated three chapters of this book to one of my favorites topics, Security, from the basics to more complicated scenarios with Claim-Based security and Federated authentication using WCF services with Windows Identity Foundation. You can find more information about the book and the table of contents in the Wrox web site here.

  • Enabling Service Availability in WCF Services

    It is very important for the enterprise to know which services are operational at any given point. There are many factors that can affect the availability of the services, some of them are external like a database not responding or any dependant service not working. However, in some cases, you only want to know whether a service is up or down, so a simple heart-beat mechanism with “Ping” messages would do the trick. Unfortunately, WCF does not provide a built-in mechanism to support this functionality, and you probably don’t to implement a “Ping” operation in any service that you have out there. For solving this in a generic way, there is a WCF extensibility point that comes to help us, the “Operation Invokers”. In a nutshell, an operation invoker is the class responsible invoking the service method with a set of parameters and generate the output parameters with the return value.

  • Integrating WIF with WCF Data Services

    A time ago I discussed how a custom REST Starter kit interceptor could be used to parse a SAML token in the Http Authorization header and wrap that into a ClaimsPrincipal that the WCF services could use. The thing is that code was initially created for Geneva framework, so it got deprecated quickly. I recently needed that piece of code for one of projects where I am currently working on so I decided to update it for WIF. As this interceptor can be injected in any host for WCF REST services, also represents an excellent solution for integrating claim-based security into WCF Data Services (previously known as ADO.NET Data Services).

  • ActAs and OnBehalfOf support in WIF

    I discussed a time ago how WIF supported a new WS-Trust 1.4 element, “ActAs”, and how that element could be used for authentication delegation.  The thing is that there is another feature in WS-Trust 1.4 that also becomes handy for this kind of scenario, and I did not mention in that last post, “OnBehalfOf”.