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

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

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

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

Ordinance Survey OpenData (Part 2 - Importing The Data)

All of the data is in different files; SSIS is capable of extracting data from multiple files however for the purposes of this article I am going to stick to the Import Export Wizard. To combine all of the files into one (big) file a quick switch to the command prompt is required: type data\*.csv > .\CodePointOpenCombined.csv Because none of the data files have headers this works fine, if they did have headers some work would be needed to strip those out. Create a new database in SQL Server then follow these steps: ...

December 10, 2010 · 2 min

Ordinance Survey OpenData (Part 1 - Schema Scanner)

In April 2010 the Ordinance Survey released certain parts of their data under special licence which allows for commercial use without cost. All the types of data made available are outside the scope of this post although I hope that the techniques described could be applied to any data set not limited to Ordinance Survey data. In this post I am going to look at Code-Point Open, a list of all UK postcodes with their corresponding spatial positions. ...

December 3, 2010 · 4 min

Elevated Command Prompt on Vista and Windows 7

I explained how to get an elevated Command Prompt to perform system tasks in the comments of my post about setting the MTU in Windows 7, I am writing the up a bit clearer and linking it from that post. I have a blog post for Windows 8 if you have already made the move. In Vista and Windows 7 applications don’t automatically get administrator privilege, 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: ...

October 7, 2010 · 1 min

ASP.net 3.5 GridView RowCommand event fired twice

I am writing this up to hopefully save someone else time in the future, this particular problem took up six hours of my day yesterday causing quite a bit of frustration for me, as the developer, and the users of the application. If you are searching for the solution scroll down to the bottom of the page where I will outline the solution I used to resolve the problem. It is also worth pointing out that this does appear to be fixed in .NET 4. Certainly I was able to consistently reproduce the problem with VS2008/.NET 3.5 on multiple different computers. However after converting the project to VS2010/.NET 5 I haven’t seen the issue. ...

April 1, 2010 · 3 min

OneNote vs Evernote

Somewhere in the middle of 2007 I was encouraged to use OneNote to clear my desk and move to a “paperless” system, initially this was a little painful as it seemed a gargantuan task to scan in all of the bits of paper on and around my desk that appeared to contain useful information. As it turned out I realised that if a bit of paper was covered by another (or in fact covered by anything) it wasn’t that important to the execution of my role and could probably be thrown in the bin. At the time I was not using Microsoft Office at home, opting to use OpenOffice for the limited needs I had for productivity software. I did however want a better way of organising my paperwork at home, OneNote 2007 came in at about £70 which isn’t unreasonable for what you got. Then I discovered Evernote. Seemed perfect, I don’t generate so much paperwork that I would bust the 40mb/month limit on the free account. In the end I decided to adopt Evernote at home and continue to use OneNote at work, it proved quite a handy separation of work and life. Recently I have run into two problems that are pushing me towards using Evernote for everything, and ditching OneNote entirely: ...

February 27, 2010 · 2 min