Exposing authenticated data from Azure Mobile Services via an ASP.NET MVC application

After seeing a couple of posts in this topic, I decided to try to get this scenario working – and having never used the OAuth support in MVC, it was a good opportunity for me to learn a little about it. So here’s a very detailed, step-by-step of what I did (and worked for me),…

5

Creating ASP.NET Web APIs on Azure Web Sites

Last month the new Windows Azure features were released, and one of them which I found quite interesting was the “Web Sites”. Currently I have an account at GoDaddy.com where I host my “pet projects”, and now that Windows Azure has a similar feature at a similar pricing plan (for the preview we can have…

5

CORS support in ASP.NET Web API – RC version

The code for this post is published in the MSDN Code Gallery. A few months back I had posted some code to enable support for CORS (Cross-Origin Resource Sharing) in the ASP.NET Web API. At that point, that product was in its Beta version, and with the Release Candidate (RC) released last month, some of…

6

Lightweight webhosted services with ASP.NET Web API

The code for this post can be downloaded in the MSDN Code Gallery. A couple of weeks back, Youssef Moussaoui posted about a way to create a lightweight service using the ASP.NET Web APIs. His code was built using the self-hosted support for the APIs, and with that we could write a service as simple…

0

Implementing [RequireHttps] with ASP.NET Web API

Quick post today. MVC developers are used to the [RequireHttps] attribute, which is an authorization filter which doesn’t allow any requests to be made over “plain” HTTP. This attribute doesn’t exist in Web API, but it’s fairly simple to replicate the same behavior using an authorization filter (an action filter would work just as well,…

7

Writing FormUrlEncoded data with ASP.NET Web APIs

The code for this post can be downloaded in the MSDN Code Gallery. The FormUrlEncodedMediaTypeFormatter class shipped with the ASP.NET Web APIs beta is one of the default formatters in the Web APIs and can be used to support incoming data from the application/x-www-form-urlencoded media type. This is the default format used for HTML form…

0

Supporting different controller names in ASP.NET Web APIs

The code for this post can be found in the MSDN Code Gallery. For a controller type in the ASP.NET Web API to be accessible, it needs to follow some rules: Be a class Be public Be non-abstract Implement the IHttpController interface (usually via the ApiController class) End with the “Controller” (case-insensitive) suffix That’s fairly…

0

Disabling model binding on ASP.NET Web APIs Beta

The code for this post can be found in the MSDN Code Gallery. As I mentioned in my first post about the ASP.NET Web APIs, people used to WCF services may get a little confused at first with the concept of model binding, which is the process by which the inputs to the actions (formerly…

2

Implementing CORS support in ASP.NET Web APIs – take 2

This post was written for the Beta version of the ASP.NET MVC 4. The updates needed to make them run in the latest bits (Release Candidate) are listed in this new post. The code for this post is published in the MSDN Code Gallery. Last post I showed one way to implement CORS support in…

20

Implementing CORS support in ASP.NET Web APIs

This post was written for the Beta version of the ASP.NET MVC 4. The updates needed to make them run in the latest bits (Release Candidate) are listed in this new post. The code in this post is published on the MSDN Code Gallery. By default, a web page cannot make calls to services (APIs)…

20