Archives
-
Streaming large content from a WCF RESTFul service
Streaming large content such as media content, images or files is a common scenario for RESTful services. If a scenario like this is not well addressed or implemented on the service side, there is a high risk of consuming server resources like memory or CPU in a matter of seconds. This usually happens when the complete content is loaded in memory before it is transferred to the service consumer.
-
Custom Basic Authentication for RESTful services
It’s very common when developing RESTful services to authenticate users against a proprietary user database. This is generally done with a combination of username and password through http basic authentication. Unfortunately, basic authentication is tied to windows accounts in IIS, which leads us to find out some alternatives or workarounds to support this scenario. WCF 3.5 made possible to authenticate transport credentials with one of the existing UsernamePasswordValidator extensions, however, this approach does not work for IIS hosted services.
-
“MUrl” and “MService”, two new DSLs for REST services
Doug Purdy and Chris Sells announced today in the mix the availability of two new DSLs for RESTful services. MUrl for defining RESTful clients, and MService for defining the service implementation.
-
Negotiating SAML tokens for REST clients with the HttpClient class
Continuing my post “Brokered authentication for REST active clients”, I will show today how the client code can be simplified using the new HttpClient (WCF REST Starter kit 2) and some custom http processing stages attached to its pipeline.
-
PollingAgent and AtomPubClient in the WCF Rest Starter kit preview 2
PollingAgent is an utility class for consuming REST services that implement conditional gets. An instance of this class will periodically invoke the service within a predefined interval of time, and fire an event on the client side when a new response is available to consume. It is internally layered on top of the HttpClient class, so all the pipeline infrastructure provided by this last one is also supported for this pooling agent.
-
HttpClient in the WCF REST Starter Kit Preview 2
HttpClient is a new utility class introduced in the WCF REST Startert Kit Preview 2 for consuming REST services. This new class is made up of three different parts,
-
Code generation with T4, Entities to DTOs example
T4 is a powerful template engine for code generation shipped out of the box within Visual Studio. It is an evolution of T3, which was initially introduced a couple of years ago as part of the DSL toolkits and the software factories.
-
WCFMock, a mocking framework for WCF services
WCFMock, a mocking framework for WCF services. Not a very original name, but it was the first one that came out to my mind :). If you have been following my blog for a while, you might notice that I discussed different approaches in the past to unit test WCF services, here and here. One of the major pains that you will find today for unit testing WCF services is the static operation context (OperationContext and WebOperationContext). If you service implementation relies on that context for doing something, you will have a hard time trying to test that functionality.
-
Brokered authentication for REST active clients with SAML
I have been thinking for a while about what could be a good way to support brokered authentication for active REST clients. Something I did not want to do was to force the use of WS-Trust Active profile, which is in essence SOAP based.