Actual Client IP Address on Azure WebSites with CloudFlare

Over at Vinyl Deals, I use CloudFlare to handle some caching and firewall issues. Like any good server admin, I check my logs to make sure the app is running smoothly so people can find those sweet record deals. But sometimes I notice a strange uptick in traffic on the back-end that doesn’t show up in the front-end analytics. Usually, this means it’s just a bot. Often it’s Googlebot, which I’m totally fine with.…

AngularJS and TypeScript

Lately, I’ve started using AngularJS instead of Knockout. Knockout.js is very popular in the .NET world, is very easy to use, and meshes well with .NET devs used to the MVVM style of development. I highly recommend it. But, yeah, it’s fair to say that I’m being a little fickle in deciding to switch. Ask me for a definitive reason and I’ll waffle something about having to create my own binding handlers in knockout.…

The Azure Tech Behind MomCharts

Last week, my company published the public preview of MomCharts.com, our baby tracking software in the cloud. One of the design goals for the software was make sure it was cross-platform, cross-device, and as maintenance free as possible. My company (Heavy Code) is a member of the BizSpark program by Microsoft so we’ve got access to top tier tools and, most importantly, Windows Azure, at no cost to us. Pieces of Azure In Use There are a number of Azure services MomCharts runs.…

Watch Users with New Relic and .NET

We’re all programmers, right? We want to constantly improve our software and make the right choices about what to build. Since we’re all good engineers, however, sometimes it’s time to cut features. How will that impact the users? Do we even know if the users use a specific feature? One way is to remove the feature and see who complains. But there’s a better way. Telemetry Telemetry lets us watch what the users are doing without standing over their shoulder.…

ASP.NET Web API In-Memory Hosting Integration Test and Ninject

A while back, I posted how I used StructureMap along with the new ASP.NET self-host features to do integration tests on my ASP.NET Web API. Since that post, I’ve tried out Ninject with some new projects and, thanks to Filip, I discovered In Memory Web Hosting. This post will go over how to integration test an ASP.NET Web API project that uses Ninject for IoC and in memory hosting. I borrow from Filip’s post with adaptations for my purposes.…

Force Web API to Fail with ActionFilter

Sometimes, what you really want is failure. Success is great. Hooray! The crowds roar at your continued success. But in reality, everything is not peachy. Developers choose to ignore failure planning to their peril. Me? I need ASP.NET Web API to fail. In one of my projects, I utilize the ASP.NET Web API for the heavy lifting. My JavaScript and jQuery code make a lot of AJAX calls to the API and so far, I’ve got all of the success handlers written.…

Authentication and Membership Updates for MVC 4 RTM

I’ve spent the last couple days moving a project from MVC 4 RC to MVC 4 RTM. It’s gone well, but I encountered a couple trouble spots related to MVC 4 authentication and membership that I want to share. Starting Point I’m using a MVC 4 application that was created pre-RTM, so I’m working through some pain that won’t cause trouble for people creating new MVC 4 applications. Microsoft provides some information on how to upgrade a project from MVC 3 to MVC 4 on their website.…

Setup StructureMap with ASP.NET Web API Release Candidate

One important change from the Beta of Web API to RC was the way it handles IoC. So far, there have been a few guides of how to do it with Ninject or Unity, but I’m still using StructureMap for many of my projects. In a previous post, I showed how I used StructureMap in an integration test of Web API using NUnit. However, that was against the Beta and was in the context of automated testing.…

404 Error on ASP.NET 4.5 on IIS 7

I recently tried deploying a new ASP.NET 4.5 MVC 3 application to our production web server. Everything worked fine on test and on my local machine, so I was not expecting trouble on production. But after I deployed it to production, every URL below the top-level immediately returned a 404 HTTP error. Other applications worked fine, but the new one gave me lots of trouble. This took a bit of work to figure out, but here’s the answer.…

Integration Test ASP.NET Web API with StructureMap

Update 2: I have written a new post going over how to setup StructureMap with the RC of ASP.NET Web API. Go check that out as well. Update: This post was written against the Beta of WebAPI. Word out is that this will change for the release candidate. I have not yet done a new post for the release candidate. You can read some about these changes here. I intend to write a new post once the RC has been released.…