June 2012 - Posts

9
Comments

Using Razor together with ASP.NET Web API by Fredrik N

On the blog post “ If Then, If Then, If Then, MVC ” I found the following code example: [HttpGet] public ActionResult List() { var list = new [] { "John" , "Pete" , "Ben" }; if (Request.AcceptTypes.Contains( "application...
6
Comments

ASP.NET Web API Exception Handling by Fredrik N

When I talk about exceptions in my product team I often talk about two kind of exceptions, business and critical exceptions. Business exceptions are exceptions thrown based on “business rules”, for example if you aren’t allowed to do a purchase. Business...
5
Comments

Log message Request and Response in ASP.NET WebAPI by Fredrik N

By logging both incoming and outgoing messages for services can be useful in many scenarios, such as debugging, tracing, inspection and helping customers with request problems etc. I have a customer that need to have both incoming and outgoing messages...
More Posts