Skip to main content

Posts

Microsoft Azure: Using SSDs in Azure Virtual Machines and Azure Cloud Services

Recently Microsoft released a new set of VM sizes for Microsoft Azure. What makes these new VMs special is that they not only offer faster vCPUs (approximately 60% faster than the A series) and more memory (up to 112 GB), the new VM sizes also all have a local SSD disk (up to 800 GB) to enable much faster IO reads and writes. If you are looking for even better performance, these are the VM sizes you need! The new VM sizes include the following: General Purpose D-Series VMs Name vCores Memory (GB) Local SSD Disk (GB) Standard_D1 1 3.5 50 Standard_D2 2 7 100 Standard_D3 4 14 200 Standard_D4 8 28 400 High Memory D-Series VMs Name vCores Memory (GB) Local SSD Disk(GB) Standard_D11 2 14 1...

ASP.NET Web API error: Can't bind multiple parameters to the request's content

A colleague asked me to help him out with a problem he had with a specific ASP.NET Web API controller. Let’s have a look at his controller first: Inside his web application, he uses a form to post data to this specific controller. However when he runs his application, the post always fails with the following error message: Can't bind multiple parameters to the request's content This is by design. In ASP.NET Web API it isn’t possible to pass multiple parameters by body. As we are using a POST the form data is part of the message body. ASP.NET Web API is unable to extract the form data from the message body and set the parameter values. To get this working, you can either replace the parameters by a FormDataCollection and do the binding yourself or you can create a POCO object to and use the built-in model binders:

NHibernate: Copy an object graph

We are working on an application where we have to create copies of a whole object graph and save this copy as a new object(or better an object tree) to the database. I found 2 possible solutions to get this done: Option 1 – Serialize and deserialize the object tree This is probably the easiest solution. Take the object tree you want to copy, serialize it, deserialize it and attach it to an NHibernate session. The only caveat is that every object in your object tree should be marked as [Serializable]. Option 2 – Combining an ID reset, Session.Evict and some dependency walking Another option is to walk through the object tree yourself while resetting the id values to their default. Don’t forget to remove the objects from the session first by calling Session.Evict.

SQL Server: the database could not be exclusively locked to perform the operation

To get an application up and running, I had to change the Database Collation. But updating it failed with the following error message: The database could not be exclusively locked to perform the operation I was able to fix it by (temporarily) change the database access to SINGLE_USER.

Web API: Binding to form data

Just a quick ASP.NET Web API tip today… If you want to access the form data posted to a an ASP.NET Web API controller, the easiest solution is to use the built-in FormUrlEncodedMediaTypeFormatter, which knows how to map every key/value in the form data to a FormDataCollection . In your controller method, you can specify the FormDataCollection as a parameter:

Adventures in Angular

Already using Angular.js ? Or interested in learning about it? Subscribe to the ‘Adventures in Angular’ podcast; a weekly show dedicated to the AngularJS framework. Certainly check out this weeks episode as Rob Eisenberg talks about what’s coming in Angular 2.0.

I survived the first Ordina Hackaton… (and started counting down to the second edition)

Yesterday I didn’t succeed in creating my daily blog post. Why? Because I was recovering from a 24 hours of coding marathon this weekend. Ordina , the company I work for, organized their first Hackaton. 24 hours of coding, lots of food and even more fun. Going from Unity3D, Quadcopters, Powershell, Xamarin, Windows Store Apps, Angular, and even Sharepoint, there was a technology niche for everyone. Together with some colleagues, we started ‘Team Awesome’ ready to build the coolest game ever(and this in 24 hours)! Our goal was to build a Frogger clone with the following features: · Full 3D game running on Windows, Android and Facebook · Single- AND multiplayer · Stunning graphics and sound effects never seen in a computer game before · Oculus Rift integration( http://www.oculusvr.com/ ) · And many more… Without any previous experience, we were able to build a Unity 3D game using the language we all love, C#… It was maybe a little bit too ambitious but we got quite fa...