Month: March 2015

Lowercase Routes in ASP.NET MVC

I don’t know about you, but I believe all URLs should be lowercase. Seeing a URL with uppercase letters always seems wrong to me, and frankly, I think looks kind of ugly. This goes for intranet web apps as well. Historically, in ASP.NET MVC apps, you have to take care of this yourself. For example, …

Read more

Using Configuration to Define Web API Routes

In most Web API projects, endpoints are usually defined one of two ways: by adding routes to WebApiConfig or by using attribute routing on the API controller actions. I’m not the biggest fan of attribute routing (a post for another time), so I tend to put all my routes in WebApiConfig. Plus, the APIs I …

Read more

Modifying Web.Config with PowerShell

It’s still amazing to me some of the traffic I get from Stack Overflow for posts I wrote years ago. Below is another one about using PowerShell to flip the debug mode in a web.config file, which is weird to think about now because of the advent of config transform files. Begin wayback machine… Original …

Read more

Logging Web API Requests

Inevitably, if you’re building an API, you’re going to want to monitor requests made to that API. A big step in doing that is logging each API request so that you can capture and determine important information about your endpoints, such as data being sent in, data being returned, how many times endpoints were invoked, …

Read more