OData

Create and consume RESTful APIs in a simple and standard way

Latest posts

Sep 8, 2010
Post comments count 0
Post likes count 0

Data Services Streaming Provider Series-Part 2: Accessing a Media Resource Stream from the Client

DB Blogs

In this second post in the series on implementing a streaming data provider, we show how to use the WCF Data Services client library to access binary data exposed by an Open Data Protocol (OData) feed, as well as has how to upload binary data to the data service. For more information on the streaming provider, see the first blog post in this series: Implementing a Streaming Provider. PhotoData Sample Client Application In the previous post, we showed how to implement IDataServiceStreamProvider to create a data service that uses OData to store and retrieve binary image files, the media resource (MR) in OData ter...

Aug 19, 2010
Post comments count 1
Post likes count 0

OData and Authentication – Part 8 – OAuth WRAP

DB Blogs

OAuth WRAP is a claims based authentication protocol supported by the AppFabric Access Control (ACS) which is part of Windows Azure. But most importantly it is REST (and thus OData) friendly too. The idea is that you authenticate against an ACS server and acquire a Simple Web Token or SWT – which contains signed claims about identity / roles / rights etc – and then embed the SWT in requests to a resource server that trusts the ACS server. The resource server then looks for and verifies the SWT by checking it is correctly signed, before allowing access based on the claims made in the SWT. If you want to learn ...

Aug 4, 2010
Post comments count 0
Post likes count 0

Data Services Streaming Provider Series: Implementing a Streaming Provider (Part 1)

DB Blogs

The Open Data Protocol (OData) enables you to define data feeds that also make binary large object (BLOB) data, such as photos, videos, and documents, available to client applications that consume OData feeds. These BLOBs are not returned within the feed itself (for obvious serialization, memory consumption and performance reasons). Instead, this binary data, called a media resource (MR), is requested from the data service separately from the entry in the feed to which it belongs, called a media link entry (MLE). An MR cannot exist without a related MLE, and each MLE has a reference to the related MR. (OData inhe...

Jul 21, 2010
Post comments count 0
Post likes count 0

OData and Authentication – Part 7 – Forms Authentication

DB Blogs

Our goal in this post is to re-use the Forms Authentication already in a website to secure a new Data Service. To bootstrap this we need a website that uses Forms Auth. Turns out the MVC Music Store Sample is perfect for our purposes because: The rest of this post assumes you’ve downloaded and installed the MVC Music Store sample. Enabling Forms Authentication: The MVC Music Store sample already has Forms Authentication enabled in the web.config like this: <authentication mode="Forms">   <forms loginUrl="~/Account/LogOn" timeout="2880&q...

Jul 21, 2010
Post comments count 0
Post likes count 0

OData and Authentication – Part 6 – Custom Basic Authentication

DB Blogs

You might remember, from Part 5, that Basic Authentication is built-in to IIS. So why do we need ‘Custom’ Basic Authentication? Well if you are happy using windows users and passwords you don’t. That’s because the built-in Basic Authentication, uses the Basic Authentication protocol, to authenticate against the windows user database. If however you have a custom user/password database, perhaps it’s part of your application database, then you need ‘Custom’ Basic Authentication. How does basic auth work? Basic authentication is a very simple authentication scheme, that shou...

Jul 20, 2010
Post comments count 0
Post likes count 0

Deploying an OData Service in Windows Azure

DB Blogs

Windows Azure and SQL Azure are the new Cloud service products from Microsoft. In this blog post, I am going to show you how you can take a database that is hosted in SQL Azure and expose it as OData in a rich way using WCF Data Services and Windows Azure. This walk-through requires that you have Visual Studio 2010 and both a Windows Azure and SQL Azure account. Step 1: Configure the Database in SQL Azure SQL Azure provides a great way to host your database in the cloud. I won’t spend a lot of time explaining how to use SQL Azure as there are a number of other blogs that have covered this in great detail. I h...

Jul 19, 2010
Post comments count 0
Post likes count 0

OData and Authentication – Part 5 – Custom HttpModules

DB Blogs

In the last post we saw how to add custom authentication inside your Data Service using the ProcessingRequest event. Unfortunately that approach means authentication is not integrated or shared with the rest of your website. Which means for all but the simplest scenarios a better approach is needed: HttpModules. HttpModules can do all sort of things, including Authentication, and have the ability to intercept all requests to the website, essentially sitting under your Data Service. This means you can remove all authentication logic from your Data Service. And create a HttpModule to protect everything on your web...

Jul 19, 2010
Post comments count 0
Post likes count 0

OData and Authentication – Part 4 – Server Side Hooks

DB Blogs

If you secure an OData Service using Windows authentication – see Part 2 to learn how – everything works as expected out of the box. What however if you need a different authentication scheme? Well the answer as always depends upon your scenario. Broadly speaking what you need to do depends upon how your Data Service is hosted. You have three options: But by far the most common scenario is… Hosted by IIS This is what you get when you deploy your WebApplication project – containing a Data Service – to IIS. At this point you have two realistic options: Whic...

Jun 28, 2010
Post comments count 0
Post likes count 0

Join the OData Mailing List

DB Blogs

Today we released an OData Mailing List.  This is the list to use if you have OData questions, comments on OData or want to discuss how OData should evolve over time.  To sign up to the list go here and follow the instructions provided.  The list is fully open so anyone can subscribe and participate.  Be sure to read the terms of use on the signup page to understand how  your feedback on the mailing list may be used to enhance OData over time. You can see a read only archive of all the messages from the mailing list here: https://www.odata.org/mailing-list  We look forward to hea...