ASP.NET Web API Tracing (Preview)

Together with the official release of ASP.NET Web API we released the Microsoft ASP.NET Web API Tracing preview package.  It can be installed into a Web API application to allow framework and user code to trace activities to System.Diagnostics.  Let’s look at how this works and how to use it. Overview As I mentioned in…

3

Using the ASP.NET Web API UrlHelper

This article describes how to use the UrlHelper class in WebApi to create URL’s that can be used to invoke ApiController methods.   This UrlHelper class uses the application’s route tables to compose the URL, avoiding the need to hard-code specific URL’s into the app. In our example scenario, we’ll expose these concepts: A “Store” class…

2

Dependency Injection with ASP.NET Web API and Autofac

This post describes how we can use Dependency Injection (DI) in ASP.NET Web API using Autofac to accomplish a fairly common task – namely creating an ApiController with custom parameters to service an Http request. In WebApi, we define the basic verbs of our API in a class derived from ApiController.  When an Http request…

8

Tracing in ASP.NET Web API

ASP.NET Web API (available for download or on CodePlex) supports tracing of both framework and application code. This post describes the fundamentals of Web API tracing, how to trace from your code, and how to make your code or framework code trace to your favorite logger.   Overview Tracing in this context means a notification…

2