In September Microsoft hosted AzureCon, a free virtual event to showcase some of the existing and new features coming to Azure.
Continue reading
So what’s an API App? Well it’s exactly what you think, a way of hosting an API written in your language of choice which can be scaled, secured and documented.
Let’s get started by creating a brand new API via the Azure Preview Portal.
Continue reading
Dynamic content Every now and then you need a way to generate some content using a template.
The obvious example which springs to mind is the humble email. You know, the kind you get when you register with a site, or tell them you’ve forgotten your password.
I’ve made and seen various attempts to tackle this. You can try simply looking for tokens and replacing them with content.
For example…
Continue reading
Sometimes when deploying an Azure project to the local compute emulator I’ve seen this error message.
“The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.”
It’s a horrible error and I haven’t been able to fix it using any of the methods found via google (e.g. “your web.config may be readonly” or “your project might have too many files in it”).
The only solution I’ve found is to do a fresh checkout of the source code from TFS
Continue reading
Other posts in this series: Part 1 Part 2 Aaron has very kindly sent me an extension to the original code for creating a simple menu for ASP.NET MVC sites. His version employs the Microsoft AJAX library to “ajaxify” the links on the menu.
The main part of his code handles getting a List Item containing an AJAX link.
public static class Extention { public static TagBuilder GetNavItem(this AjaxHelper ajax, MolineSoftware.
Continue reading
We have recently upgraded a few projects to .net 4 (and MVC 2) and have invariably hit one particular error message.
We are using the Spark view engine, and having upgraded the project to MVC 2 would see this error…
Dynamic view compilation failed. (0,0): warning CS1701: Assuming assembly reference ‘System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ matches ‘System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’, you may need to supply runtime policy
Google helped us find this post, which explains that any referenced assemblies which in turn reference MVC 1 could be causing this issue.
Continue reading
I recently hit a requirement to take an array of objects and post them to an asp.net mvc action using JQuery’s ajax functionality.
I had to do a bit of Googling to work out how to do this so figured I’d document what I found.
The main two parts to this are getting JQuery to spit out JSON data and ASP.NET MVC to deserialize that data into a strongly typed generic list.
Continue reading
If you've read my previous posts on using Machine.Specifications and Rhino AutoMocker, you'll know I'm a fan of both frameworks. James Broome has released a really useful extension for MSpec which pulls MSpec and Mocking together in one easy to use package. http://jamesbroo.me/introducing-machinespecificationsautomocking/ It's well worth checking out.
Continue reading
In part 1 and part 2 we covered setting up MSpec, writing our specifications and then implementing one of those specifications.
So far we’ve covered very simple tests for code which has no external dependencies and does very little. Now we’ll turn our attention to those tests which (on the face of it) are more complicated and cover code which relies on data access, email services etc.
Lets tackle the the “when asked for products matching search term” specification.
Continue reading
In part 1, we looked at setting up MSpec and writing our first specifications.
Now we get on to the all important implementation stage.
We ended up with these basic specifications by the end of part 1.
using Machine.Specifications; namespace MSpecExample.Tests.Controllers { [Subject("Product Search")] public class when_product_search_page_requested { It should_return_product_search_page; } [Subject("Product Search"
Continue reading