Revocation information for the security certificate for this site is not available

Posted by admin on March 14, 2013
Uncategorized / Comments Off

At two o’clock this morning one of our production servers decided that it was no longer able to decide if the SSL certificate installed was valid. This effectively broke our system as we have two asmx webservices that “talk” to each other over SSL.

Browsing to the site in IE8 resulted in the following error being displayed:

“Revocation information for the security certificate for this site is not available”

Viewing the certificate path in IE8 only displayed the installed certificate (issued by Digicert). Viewing the certificate in Firefox 19.0.2 it showed the path back to the root certificate.

These are the steps we followed to fix the problem:

1 – Start > Run; type MMC and press Enter.
2 – Click File > Add/Remove Snap-in.
3 – Click Add.
4 – Select Certificates and click Add.
5 – A wizard will open. Select Computer account and click Next.
6 – Select Local Computer and click finish
7 – Click Close.
8 – Click Okay.
9 – Expand Certificates on the left hand side of the console window.
10 – Right click on Intermediate Certificate Authority.
11 – Under all tasks, select Import.
12 – Point the wizard to the L1C Chain Certificate file and complete the wizard.
13 – Restart your IIS service.

We downloaded our L1C Chain Certificate file from https://www.digicert.com/digicert-root-certificates.htm. I’m no expert but if your website certificate was issued by another authority you’ll need to download it from them.

Details

  • Windows Server 2003
  • IIS 6.0
  • Asmx webservices
  • Digicert issued certificate

Cause

We’re not really sure, one hypothesis is the intermediate certificate got corrupted somehow.

First Impressions of Xamarin Studio vs VS2012 Express

Posted by admin on March 07, 2013
Uncategorized / Comments Off

Microsoft’s “thousand dollar IDE” finally has some competition, after a lot of speculation about Jet Brains creating a C# IDE it is Xamarin who have launched a product. I recently spent a couple of weeks kicking the tyres of VS2012 Express so I thought a quick comparison with XS (Xamarin Studio) would be interesting.

Executive Summary

XS is promising, there are still a few rough spots that need attention but they have created a good looking UI that offers a UX that feels cleaner and is more fully featured than VS2012 Express. In order to try and not impact sales of the commercial version of VS2012 Microsoft have imposed some limitations on the Express edition that are irritating. For the purposes of getting to know the XS IDE, I created a new NServiceBus 3.0 solution and added a console app and a unit test project with a single unit test.

XS is nowhere near as robust as VS2012 express which is not a surprise as they have only just released the first version and will have a much smaller development team compared to Microsoft. If they keep improving it and work out the niggles I think it could eventually be a serious alternative.

Disclaimer

I have only spent an hour getting to know XS this is just a first impression, after I have spent more time working with it and learn more about it my initial impression could change. If you spot any glaring inaccuracies or omissions ping me on twitter @porkstone

Xamarin Studio Pros

  • AutoSave
  • Better Looking
  • Loads a little bit faster (perceived not actually measured)
  • More sensible default folder structure when creating a new solution
  • Easier to launch debug
  • More sensible default using statements (using system)
  • Can set NServiceBusHost.exe to run when debugging a service but Start Multiple apps did not work only one started. I have learnt more see update below.
  • Has NUnit project Template
  • Has integrated test runner that will run Nunit tests
  • Builtin Source control integration for Git (I didn’t test this)

VS2012 Express Pros

  • Nuget works OOTB – XS requires add in
  • Nuget Command Line, quicker than a gui
  • NServiceBus.Host Nuget Package Installs without problems, XS had namespace issues
  • Very robust – XS suffered from modal windows losing focus, occasional crashes during debugging.

Link to Getting Started Docs

UPDATE: Debugging Multiple Projects

When you are working on NServiceBus in a solution it is often useful to be able to launch multiple projects at the same time. NServiceBus uses TopShelf to make it easy to switch from running your project from within the Console and a Windows service. In order to this from the IDE the paid for versions of Visual Studio have an option in the Project > Properties > debug tab that allows you to specify the exe you want to launch when you start debugging. VS2012 express does not have this option. Xamarin studio does not (yet?) have this option, it does, however, let you specify an executable to launch but it doesn’t return control it waits for the exe to complete.

Version of Xamarin Studio used:

Version 4.0.1 (build 9)
Installation UUID: 23db13c3-9d75-4ef4-a8a3-1eeb3d0efb3a
Runtime:
Microsoft .NET 4.0.30319.18034
GTK 2.24.13
GTK# (2.12.0.0)

 

Virgin Broadband’s “Fair Use” policy

Posted by admin on December 18, 2012
Uncategorized / Comments Off

I recently switched over from BT to Virgin broadband, primarily because we hardly use the land line and also because the upload speeds on copper are slow unless you are prepared to stump up cash for a business product. Virgin currently provide a broadband only service @ 30Mbps down and 3mbps up, the cost is £17.50 for the first 3 months then £22.50 per month and the contract length is 12 months.

Their website proudly boasts:

Unlimited downloads – no caps no hidden charges

However if you scroll down and read through the small print you’ll see this:

 

Downloads without hidden charges: Acceptable Use Policy applies. Traffic Management operates from 4pm to 9pm and 10am to 3pm, to ensure a consistent user experience.

If you read through the traffic management you’ll see this means is you’ll be capped if you use the service too much at peak times, the really restrictive part is that Virgin do not average use over a week or a month they simply have daily hard limits, if you hit the limit your capped immediately. This really sucks for me as I had intended to run a nightly backup of photos and home videos. This means that occasionally (once every few months) I need to upload ~20Gb of footage. This would take some time even without the capping but when the cap kicks in it renders my broadband unusable. So even though I am a light user and don’t download or upload much during the rest of the month I get the unpleasant experience of have unusable broadband for a couple of days every few months.

All Virgin products are currently subject to this policy although the cap does vary according to product. I don’t think this policy is evil per se but IMHO Virgin are guilty of miss-selling their broadband by stating there are no caps there is a speed cap if you breach what they deem to be fair use.

Testing NServiceBus Applications

Posted by admin on May 14, 2012
nServiceBus, Testing / Comments Off

Testing these days is thankfully more common place but there is still some confusion in terminology so i’ll start by clarifying what I mean by the terms I use later.

Unit Test – A unit test can be run on any computer that can compile your code, it does not need relational databases or other infrastructure like the file system to run or pass.

Integration Test – An integration test does rely on some infrastructure being present. It tests that more than one piece of technology works with another. For example that a repository can persist data to a database.

Acceptance Test – A test that requires the entire application be deployed and tests journey’s designed to simulate user activity in the system.

I’m not going to talk about Unit test’s as far as i’m concerned they are a known quantity with NServiceBus. Just select your mock object library of choice and start writing your tests. That said the amount of repetitive code you have to write as you mock out handler after handler does seem tiresome.

Our team is trying to automate as much of the testing as is reasonably possible. We want developers to be able to write tests that they can run locally and that will run against our WIP, UAT & RC environments to indicate the state of those environments. Our application is divided up into SOA serivces. So when a developer is working on a feature ticket they will likely only be writing code for a single service.

We started out with the idea that we would write unit tests and acceptance tests and that would give us enough coverage and to be honest that is still true to this day. What has changed is that our codebase has grown and correspondingly the build / deploy / test times have increased as well. So what could we do about it? Well the first thing we did was start rewriting our build scripts to perform tasks in parallel, this process is trickier than we first imagined as dependencies complicated matters. If not done properly it could destabilize our development environment so whilst this will help in the long term it will not solve our problems today. Another thing that happened as our application grew, the amount of resources it took to deploy the entire system onto a single machine also grew. We started to have to upgrade developer workstations to have 16Gb of Ram just to be able to run the entire application locally. After a while it became clear that this approach of deploying the entire application locally was not going to work forever but after some thought it seemed that it did not have to. We had already split our app into SOA services why not just build / deploy / and test the service you were creating a feature for? It turns out that this is not only straight forward but that it has other benefits when it comes to testing.

So now we just have the service that we are working on to worry about instead of taking 15 minutes to build the entire codebase we only spend 90 seconds building one service. When it comes time to deploy the changes we only need to update the endpoints we have modified, locally we deploy a SOA service to just one endpoint this takes only 1 minute. Then we write “integration tests” that simply inject commands and events into our SOA service’s input queue that simulate user input and events published by the other services. The benefit of this approach is that simple tests take < 2 seconds to complete and complicated ones take less than 10 seconds. These test times might seem a little bit longer than you would expect the next paragraph explains why.

Testing Asynchronous Messaging Applications
Martin Fowler talks about the highs and lows of testing asynchronous applications and I can confirm from first hand experience that he is correct. If you inject a command into your input queue and then wish to make an assertion against a query that expects that data to be written to a database then you have to poll that database for a reasonable amount of time to check the data. Your test then either passes because the data is returned as expected or the timeout period is reached. This sounds simple and it is but only when you have figured out exactly what you need to poll for. If your system requires that messages be processed in a particular order then your tests must poll to ensure that the preceding message has be processed before you inject a subsequent one. In and ideal world you’ll have everything setup so that your system can handle messages in any order but in the real world you may not. What gets even more interesting is when you need to make data modifications to simulate time passing. As soon as your tests start modifying data then they are likely to encounter deadlocks, so you must include retry logic inside your tests if you need to update data like this. We have created a framework that helps make developers a lot more productive it has functionality to poll for a specified interval say every second or it can use a dynamically increasing interval that will check after 250ms, 500ms,1sec, every 5secs this helps reduce test times and shorten feedback. We are using the MbUnit framework which has some nice features for running tests in parallel which can dramatically reduce test run times.

This post is a work in progress but I wanted to put it out there to see what others are doing so if you have anything you like to share or disagree with the above let me know via twitter.

Comments Temporarily Disabled

Posted by admin on January 30, 2012
Uncategorized / Comments Off

Due to the amount of comment spam.

When I have figured out how to enable captcha on wordpress comments are switched off.

TSQL snippet – Grant a Login Read-Only Access to all databases on server

Posted by admin on January 16, 2012
SQL Server, Uncategorized / 1 Comment

This snippet will generate a script that if run will grant access to all the non system databases on the server.

Running Approvals Tests from Resharper Gotcha

Posted by admin on November 07, 2011
Uncategorized / Comments Off

Llwellyn Falco has created a ellegant testing framework called Approvals I have been using in it for a few weeks and found it very useful.

I ran into a gotcha when trying to run tests using the Resharper Test Runner, the default path was not being picked up correctly, fortunately all I had to do was turn off Resharpers Shadow-Copy feature and all was well again.

How to keep the cost down when planning your wedding.

Posted by admin on October 18, 2011
Uncategorized / Comments Off

Folks don’t get married all that often so unless you happen to be an event planner by trade you will be a beginner when it comes to planning your wedding. I have been directly involved in planning one wedding (mine) and what follows are some observations of where the significant costs and challenges arise. I have also been to lots of friends weddings so some of my observations come from those experiences.

The Numbers

First of all you have to come up with a number that represents what your prepared to spend. For this post to be relavent that number will need to be inside the range of £2,000 – £30,000 if it’s not then you can stop reading now :) Then you need to work out the number of people you will invite, this may be two numbers one for the number you’ll invite to the ceremony and one for the people coming to the reception. It might even be three if you plan to invite some to only the party in the evening.

The Location and date

You’ll need to consider where your guests will be travelling from when you are looking for a location. We would all love to get married somewhere beautiful like the Amalfi coast in Italy, but you need to consider the practicalities. If you pick a remote location you will have to accept that some of your friends or familly may not be able to come. This comes down to the situation of your familly and close friends if they have small children then shipping the whole familly overseas to watch you get married will be quite an undertaking, it’s best to ask them first before making this call. Equally if you and your friends are DINKS (dual income no kids) a wedding abroad might work well, a friend of mine did this and we had a great time.
The date you pick is all about giving you and your guests enough notice to plan for the big day. If you are going for a modest number of guests 30-40 and a simple ceremony then I think you should set a date six months or later. Most of the wedding industry like dress makers, cake makers, photographers will expect six months notice and some will charge extra if you need their services sooner. If you are planning a larger wedding 100-150 guests and then I would reccommend choosing a date that’s at least a year away. We managed to plan a wedding for 160 guests in six months but I would not reccomend this, when we were talking to suppliers and told them the date was in August most assumed we meant the following year.

The Venue(s)

Potentially one of the largest costs is where you decide to hold the wedding, it also dictates how complex the logistics of moving & feeding guests will be. The simplest and cheapest option is to find a nice, large hotel and get married in the grounds and have the reception in one of the function rooms. This means your guests can book rooms at the hotel so they do not have to worry about transport to and from the church or how they will get home. If you go for this option you should ask the hotel if they will reserve rooms for your guests and you should also try and negotiate a discounted room rate. When you send out the invites you should inform your guests that they can book a room at the venue and include contact details. When choosing a hotel you need to check the room rates ideally you want a good range of rooms available at a good range of prices. If you are having a pay bar then check out bars drinks prices, some skillful negotitaion might secure a discount on the standard prices. You should also check that the hotel has ample car parking if your guests will drive to the wedding.If you have decided that you will get married in a church then ideally find a church that is close to the hotel you choose for the reception. You then might want to consider hiring coach to take people from the hotel to the church and back to the hotel. We did this at our wedding, the cost of hiring a 50 seater coach with driver for 12hrs was £500, smaller mini buses for less time are cheaper.

The Food

After the ceremony we invited all our guests back for lunch there are two options a buffet or a sit down meal. A sit down meal is about 3 times more expensive than a buffet for the same quality of food. If you are hosting the party (we had a Marquee in the garden) then if you have a favourite local restaurant ask them if they would be interested in doing the catering often this will be the cheapest option that guarantees nice food. If you are holding the reception in a hotel check before booking that there catering meets your expectations, choose your menu and ask to taste a sample in advance. Don’t forget a % of your guests won’t eat meat and some might have special dietry requirements you should probably put a section about this in your invitation. One wedding I attended starters were served at your table but when you were ready you went up to the buffet to get your main course. This worked well because it naturally staggered the guests and kept the queue at the buffet reasonable. The sit down meal at our wedding cost £40 per head.

The Party

We had a party after the meal and invited some guests just for the evening, this worked well as we maxed out the guestlist for the ceremony but could easily add people to the evening. We hired a live band which cost about £1100 but they were really good and got everyone up to dance I would reccomend live entertainment over a DJ if the budget will stretch to it. The band came with PA system and lights included.

100 Person Wedding Example Costing with entire wedding held at hotel

£2500 – Buffet
£1500 – Champagne & Wine with meal and toasts (Check if hotel charges corkage as this will increase cost)
£1000 – Function Room & Chapel Hire
£1200 – Live Music swapping for a DJ would be cheaper say £400
£2000* – Pay Bar @ £20 head, optional let guests pay, they won’t get so drunk and thank you in the morning.

£1000+ – If you have a dress made min cost is £1000 sky’s the limit though
£1000+ – Simple flowers for the ceremony & tables, shop around and you might find cheaper
£500 – Morning Suit Hire, cost will vary depending on number of ushers, if money is tight you might ask guest to pitch in.
£1000 – Wedding rings, you can spend more and you wont get anything fancy for £1000.
£750 – Basic Photographer cost will go up if you do not own copyright and you order lots of sets of prints
£500 – Cake, personally I would not bother with a cake.
£300 – favours
£400 – Gifts for best man / bridesmaids / mother of the bride / mother of the groom
£50 – Wedding invitations if you make your own
£200 – registrar for ceremony
£500* – Cars / Limo for transport optional

New rig

Posted by admin on October 02, 2011
Hardware / Comments Off

I always blog about each pc I build as a way of remembering the bits that I purchased. My machine is left on 24/7 so I’m in the market for a pc that does not use much power when idle. This makes both cooling easy and my electricity bill lower. The total cost of this box including VAT came out at £530.

I have not measured the power consumption at idle but reading reviews of the cpu and motherboard it should be less than 15w. The case only has one 60mm fan but feels cool so it seems adequate. The fan is a little bit noisy especially as this is an HTPC case but I might be able to tweak the fan speed to make it quieter.

Putting it all together was easy as this type of case makes access simple. I fitted all components and cables before inserting the CPU and cooler. I installed Ubuntu 11.04 from a USB flash drive without any problems. The whole process took about 4 hours and my system building skills are very rusty as I built my last one five years ago.

I have split the drive into two partitions in case I need to dual boot Ubuntu and windows 7, i’m starting with Ubuntu and seeing how it goes. Ubuntu boots very fast from cold in only 22 secs from pressing the power button. I’m a Ubuntu noob so have nothing but windows 7 for comparison but this machine feels faster than my Acer 3810tz laptop (with SSD upgrade) but it is early days and I have not thrown anything heavy at it yet.

One issue I had during the build was that the media card reader USB cable would not reach the connection on the motherboard so is not operational at the moment. This does not bother me as I have  an external one.

Specs

Intel i3-2100T 2nd Gen Core 2.5GHz 35W TDP £92.00 ex vat
128GB Crucial m4 SSD 2.5″ £122.00 ex vat
DDR3 1333 DIMM £30.00 ex vat

Silverstone LC19B htpc Case £99. ex vat

silverstonelc19b.jpgSilverstoneCaseInsideView

Zotac H67-ITX-C-E Mini-ITX Motherboard £99.00 ex vat ZotacH67ITX.jpg

Ubuntu for windows users

Posted by admin on October 02, 2011
Ubuntu / 1 Comment

I am in the somewhat painful process of learning how to use Ubuntu to do the things I already know how to do in windows. Why? I hear you ask well to put it simply I like the Ubuntu philosophy and everytime I choose Ubuntu over windows for a new Pc it saves me £80 (often referred to as the windows tax), naturally I still spend the £80 but I get better hardware :) . The following notes are all along the lines of, I used to do X on windows how do I do it on Ubuntu?

How do I Browse the Web?

Ubuntu ships with Firefox but you can also install Chrome by visiting the chrome website.

How do I get to a command prompt on Ubuntu?

First of all cmd prompt in Ubuntu speak is called Terminal, click the Applications icon on the launcher and type Terminal then press enter or click the icon.

How do I get network adapter settings on Ubuntu?

In windows you would use the ipconfig command in Ubuntu use ifconfig.

How do I edit a text file on Ubuntu?

Ubuntu’s notepad equivalent is gedit. Open a Terminal window and type: gedit or run gedit from the Applications icon in the launcher. I’m sure there are countless applications that can edit text files but gedit is the built in editor.

How do I remote desktop from Ubuntu to windows?

You need a program called rdesktop to get this open Terminal and type the following:

sudo apt-get install rdesktop

You will be prompted to enter your root password (the one you entered during the ubuntu installation) then either the rdesktop program will be installed or if it is already present updated. Then to launch the program type the following and substitute the hostname or ip address (leave out the < >)

$ rdesktop <enter_hostname_or_ip_address_here>

More details can be found here

How do I connect to an FTP server on Ubuntu?

Again this post is written from the point of view of a windows user, this may not be the best way to use FTP on ubuntu but it should be a familiar way for windows users.

First install FileZilla, to do this click on the “Ubuntu Software Centre” icon in the launcher. In the search box type: FileZilla the press enter, then click install. Open filezilla by opening a Terminal windows and typing: filezilla or by using the Applications icon on the launcher.

How do I make a program icon stay on the launcher?

Easy, when the program has started right click on it’s icon in the launcher and click “Keep in launcher”.

How do I connect to Windows Home Server from Ubuntu?

You can use an application called rdesktop see “How do I remote desktop from Ubuntu to windows?” above.

You can also connect to network shares (shared folders) see here for details, the example talks about windows home server but I believe it should work for other servers as well.

How do I easily share files between Ubuntu and Windows machines?

In one word Dropbox, to install dropbox on Ubuntu visit the website and download the client. You will need to do the same for your windows machines. Dropbox comes with 2GB of free space if you need more you’ll have to pay a subscription.

How do I connect to a Cisco VPN on Ubuntu?

Install ShrewSoft VPN, click the application icon in the launcher and type Shrewsoft into the search box and press enter then click install. Import your Cisco VPN profiles and you are good to go.

How do I install spotify on Ubuntu?

Open a terminal window (see “How do I get a command prompt on Ubuntu?” above) then

type the following to edit your sources.list file:

sudo gedit /etc/apt/sources.list

Add these two lines to the bottom of the file:

## Spotify
deb http://repository.spotify.com stable non-free

Click Save then close gedit.

Go back to the Terminal window and type:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4E9CFF4E
sudo apt-get update
sudo apt-get install spotify-client-qt

These instructions may change so check the Spotify website if you have problems link