jQuery AJAX POSTing to ASP.NET MVC 3
Getting your model binding to work properly with jQuery takes a bit of trial and error if you’re just getting started. There are a couple ways to send your data and you don’t really know which way is going to bind properly to which C# type. Here is a quick example for reference after I got multiple photo deletion working on Shuttr. The basic gist of this is that binding an array of ints in Javascript requires an ICollection in C# to make the magic…
New Relic NuGet package: Automatic building and publishing with TeamCity
I’m a big fan of New Relic server/application monitoring and last year I created a NuGet package for them. I wanted to make it easy for people to get New Relic going in an Azure environment and NuGet solves that problem. I’ve used it in production on Shuttr ever since. I approached New Relic when I began work on it, but they didn’t seem all that interested or maybe I didn’t find the right people to talk to. Just last week I was approached by…
Where’s the Azure focus Microsoft?
I moved Shuttr to Windows Azure a year or so ago and I’ve been very impressed with the platform. It’s been fast, stable, reliable, etc. There have been numerous reductions to their pricing model which have made it a lot more palatable. http://blogs.msdn.com/b/windowsazure/archive/2012/03/08/announcing-reduced-pricing-on-windows-azure-storage-and-compute.aspx http://blogs.msdn.com/b/windowsazure/archive/2011/10/27/microsoft-lowers-storage-cost-for-blob-and-table-storage-in-windows-azure.aspx http://blogs.msdn.com/b/windowsazure/archive/2012/02/14/announcing-reduced-pricing-on-sql-azure-and-new-100mb-database-option.aspx With these new pricing reductions we now have a full testing environment up in Azure permanently with a 100MB SQL Azure database and an extra small web role. It’s virtually free for that. Shuttr’s main expense is storage given that…
Silverlight 5 + Internet Explorer 9 using old Content-Type from POST in a subsequent GET
We’ve been running into a super annoying problem at work. After our Silverlight application makes it’s login POST the next GET that we send fails with a NotFoundException. This only happens when using the Silverlight 5 runtime and only happens in Internet Explorer 9. I have tested now with Silverlight 4 as well as Chrome, Firefox, Opera and Safari, and IE9/SL5 is the only bad combination. Here are the headers of our login POST: POST /login HTTP/1.1 Accept: application/xml Referer: http://localhost:8080/censored.xap?timestamp=1326148328000 Accept-Language: en-CA Content-Length: 38…
Localizing a Silverlight DatePicker control, a study in pain thresholds
For shame Microsoft. There is currently no way to localize a DatePicker. Instead of letting us simply specify a format string or any of the other beautiful conventions we are forced to basically re-template the entire control. In our application, at my day job, we support many different languages/cultures. This was becoming a mess with the various date formats so we decreed that all dates would be in the ISO standard format (yyyy-MM-dd HH:mm:ss). Styling everything in the app was a 10 minute job, until…
Writing a JSON API in ASP.NET MVC 3
Here is a snippet of the source for the current API on Shuttr. The repositories are bound using Ninject so that our code is unit testable. As you can see, the actual call is pretty simple using LINQ, anonymous objects and the new JSON helpers in .Net.