Home / ASP.NET Weblogs

February 2012 - Posts

Posted to:
by: 
02-16-2012, 4:41 PM

Extending HttpClient with OAuth to Access Twitter

Many popular Web APIs such as the twitter API use some form of OAuth for authentication. HttpClient does not have baked in support for OAuth but using the HttpClient extensibility model you can add OAuth as part of the HttpMessageHandler pipeline. The HttpMessageHandler pipeline is the main extensibility point for the HTTP object model underlying both HttpClient and ASP.NET Web API (they use the exact same model). The pipeline allows up to insert message handlers that can inspect, modify, and process HTTP requests and responses as they pass by. The following diagram shows where HttpMessageHandlers sit in the message path on both client (HttpClient) and server side (ASP.NET Web API). The work like “Russian Dolls” in that each handler passes the...
Posted to:
by: 
02-16-2012, 4:59 AM

HttpClient is Here!

HttpClient is a modern HTTP client for .NET. It provides a flexible and extensible API for accessing all things exposed through HTTP. HttpClient has been available for a while as part of WCF Web API preview 6 but is now shipping as part of ASP.NET Web API and directly in .NET 4.5. You can also download it using NuGet – we just use the following three NuGet packages in this blog: System.Net.Http : The main NuGet package providing the basic HttpClient and related classes System.Net.Http.Formatting : Adds support for serialization, deserialization as well as for many additional features building on top of System.Net.Http System.Json : Adds support for JsonVaue which is a mechanism for reading and manipulating JSON documents In case you haven’t...
Posted to:

UX Anti Patterns for Security on the Web and in the Enterprise

I log into my local bank's website quite often. I transfer money between accounts and all the usual things. Today, when I logged in, I saw that they've decided to dump the security questions they had us answer earlier this year and replace them with a completely new and obscure set. If you don't set the security questions, you can't get to your bank account . Don't get between me and my money. Seriously. There's no better way to get on my bad side. In addition, they decided to make the questions really different from the usual set. I'm sure they feel like they're doing the right thing in the name of security, but here, they have failed. That got me thinking about security usability and other anti-patterns I've...
Posted to:

What is worth noting in WebMatrix 2

If I have to summarize in what is worth noting in WebMatrix 2 so far, here is how I would like to put it: Inspiring Environment – Web development is an inspiring task and I believe having an inspiring environment for it is important.  In WebMatrix we have always aspired to give web developers a polished and fresh environment to achieve mundane tasks.   Some interesting things worth noting in WebMatrix 2 from this standpoint are: App Install Workflow – We aspired to ask almost zero questions when you install an open source app like WordPress or Joomla.  We make the default choices for you and yeah we know that some of you want full control so we will enable that as well. Color Picker – Yeah you would think that what is the...
Filed under:

< Previous 1 2 3

Archives