Vittorio wrote a post earlier today showing how to fetch the identity provider feed from ACS and use it to drive the sign-in handshake from within your application and UI.
This is indeed a very useful (and user friendly) approach. Call me old fashioned, but I’d rather like to do that using C#/server side ;)
I wrote a simple class that turns the ACS identity provider feed into an object model. In essence the logic looks like this:
public async Task<List<IdentityProviderInformation>> GetAsync(
var url = string.Format(
var jsonFormatter = new JsonMediaTypeFormatter();
var formatters = new List<MediaTypeFormatter>()
var client = new HttpClient();
var response = await client.GetAsync(new Uri(url));
From there you can data bind to a UI control (e.g. WPF, WP, WebForms) or pass on to a MVC view (honoring the MVC model ;)).