Azure: No current subscription has been designated

Somethings a process doesn’t go to plan, this isn’t unusual by any stretch of the imagination. However we can all feel a little lost when the instructions set out before us just don’t seem to work. That was how I was feeling today when I got the following message while trying to use the Azure Resource Manager API through PowerShell: Get-AzureLocation : No current subscription has been designated. Use Select-AzureSubscription -Current to set the current subscription. At line:1 char:1 + Get-AzureLocation + ~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Get-AzureLocation], ApplicationException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.GetAzureLocationCommand As it turns out the error message is less than helpful as there were no subscriptions defined at all, tracking this all the way back through my process I noticed this warning message: ...

April 17, 2015 · 1 min

Iain M. Banks gave me more than Science Fiction books

Iain M. Banks died today, in my mind Iain is one of the few people who was capable of building a world so vast yet so detailed that it would take a life time to understand the ramifications and practicalities of living in this kind of pan-galactic near-post-physical civilization. Iain masterfully takes you through a single thread introducing ideas and concepts that underpin something much larger than the story itself. He does this again and again, winding threads together to build a book. Beyond my awe of Banks’ world building and book writing skills, there are some very specific things that he introduced to me that have contributed to me as a person: ...

June 9, 2013 · 2 min

Elevated Command Prompt on Windows 8

Two and a half years ago I posted about openening an elevated command prompt on Windows Vista and Windows 7. The process has changed slightly in Windows 8 as we have lost the traditional start menu. In Windows 8, applications don’t automatically get administrator privileges, they either need to request it or the user needs to explicitly start the application as an Administrator. The way to do this with the Command Prompt is as follows: ...

March 12, 2013 · 1 min

Public Virtual Auto-Properties and CodeRush

Since starting to make the move towards utilizing NHibernate in most of my projects I have been a little frustrated by the need to make properties virtual. This is by no means a criticism of NHibernate just the tooling, specifically Visual Studio 2010 and CodeRush. Whilst CodeRush has templates for everything the virtual keyword dosn’t seem to get a look in, fortunately it’s not hard to add support. Thanks to Rory Becker’s article on Creating Virtual Methods I had everything I needed to create the template. Auto-properties are actually significantly less complex than methods as they are composed of little more than the type, property name and the { get; set; } block. Templates are easy enough to create from the DevExpress Options Menu (DevExpress Menu -> Options) you jump to the templates page quickly with the search in the top left hand corner. I prefer to organize my custom templates into their own folder, then I can easily import and export these between machines via drop box. 1) Right click your preferred folder and select “New Template” inter “u?Type?” and press enter/OK. 2) Set the Context - I copied the context of my template from a?Type? and removed the InStruct directive, as virtual is not valid in structures, the Use: field should read something like this: ...

February 11, 2012 · 2 min

Connect to VPN with Windows 7

Windows 7 and Windows Server 2008 R2 has some great new ways of connecting your road warriors and teleworkers to your network. For most of us Systems Administration types Routing and Remote Access is still the most common way of achieving this connectivity without DirectAccess. Because I have written this documentation up twice now for two separate companies I thought it would be worth writing it a third time and placing it in the public domain for reference in the future. The documentation assumes that the VPN End Point is Windows Server Routing and Remote Access, however the instructions work for a number of other vendors VPN end points. What you will need: ...

July 11, 2011 · 3 min

Orchard Placement ID Strings Must Match

I spent far too long trying to fix a error while developing an Orchard Module. To explain further Orchard CMS derives a lot of its flexibility by representing content in highly abstracted terms called shapes, these shapes are dispatched by the module that wishes to output content then rendered at the end. In between these shapes can be manipulated by themes or modules to change how the information is displayed. It takes a while to get your head around it, but its a great system… until you make a mistake! Modules define where shapes are placed through a file called placement.info your module dispatches shapes through it’s Driver (a class inherited from ContentPartDriver) ...

May 31, 2011 · 1 min

Responsive Design for Programmers

Responsive Design is a term that seems to have risen up around me over the course of the last year. Up to this point I have been largely unaware of what it meant other than had a good deal to do with designing markup and CSS for the mobile platform. Today I thought I would spend a couple of hours researching the topic, I have included some of the best articles and post I could find. ...

March 30, 2011 · 2 min

2010 Blogging Year In Review

I try to do this post every year as it gives me an idea of where my readers come from and what they are looking at. My blog is consistently getting 100+ unique visitors per day, most of these are new visitors who have found a blog post via organic search results (Google, Yahoo!, etc), with a smaller number having found me through links from other sites or directly into the site. The most popular article by far has been Change your MTU in Vista and Windows 7, this is in no small part because I have written one of the few articles that explains the method to identify your ideal MTU, not just the command to change it. The next most popular article is another one from last year titled Card Reader on Acer Aspire 5100 Series under Windows 7 and my explanation of obtaining an Elevated Command Prompt in Windows 7 comes in at number 5. With the top two entries centred around fixing problems with Windows 7 this suggests more people are interested in getting their computer working than programming, ho hum. My review of OneNote and Evernote has been fairly popular, as has my review of Center Parcs from 2008. I shall try and review products and holidays as I go along, although I am reguarly stuck for inspiration in these terms. ...

December 31, 2010 · 3 min

Listing Table Sizes

Databases are a pain in the neck to look after, poorly designed models and processes that don’t remove temporary data can cause a database to grow in size. A database that is allowed to grow large beyond its requirements becomes a burden on the nightly backup, takes longer to restore in the event of a recovery scenario and slows down the development process by preventing developers from testing things out on “live” data. More often than not I have found that the problem lies with log or analytic tables sometimes this information is liberally logged (which it should be) and then totally ignored without a thought for trimming the data on a regular basis. SQL Server Management Studio provides a way of looking at the storage usage of tables individually from the properties context menu item of the table. ...

December 24, 2010 · 2 min

Ordinance Survey OpenData (Part 3 - Cleaning Up)

If you look through the schema of the table we imported in Part 2 there are a number of unused fields and some of the data appears to be missing. Cleaning up the Schema You can go right ahead and remove the fields that start with “Unused” as far as I can tell the full version of Code-Point uses these fields. Remove the nullable attributes from all of the fields, this will prevent us from doing something silly at a later date, and will avoid Object Relational Mappers such as Entity Framework from creating nullable data types. Many of the fields contain codes not data itself but codes that describe other data, so lets prepend code on the end of those fields for the time being. Cleaning up the Data The quality column in Code-Point Open describes the source and reliability of the data, it ranges from the most accurate 10 through to no data 90, when building a system around this data you need to decide at what data is important to your use case. The following query will give you an idea of the quality of the dataset as a whole, I have annotated it based upon the OS Code-Point documentation. ...

December 17, 2010 · 2 min