Uncategorized

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.

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

Test Post

Posted by admin on June 08, 2011
Uncategorized / Comments Off

tap tap tap… is this thing on?

I have just migrated from DasBlog => WordPress, it has been a bumpy ride due to my ineptitude in both DasBlog and WordPress, bear with me whilst I iron out the bumps!

 

 

 

Some SNMP Basic Grok’age

Posted by admin on July 17, 2010
Uncategorized / Comments Off

I’m digging into SNMP (Simple Network Management Protocol) to see what it offers in terms of application / server monitoring.

The specific scenario I have in mind is the monitoring of queues in MSMQ for our NServiceBus windows services. We need email alerts to be triggered if a message is moved to the error queue or if the number of items in a queue exceeds a certain threshold.

I’m working on a Windows 7 x64 laptop so the first thing I had to do was install the SNMP service (Under CP > Programs and Features).

After that was installed I had to restart the services applet and right click > Properties > Security on the SNMP Service and create a “public” community.

After this I had to download a command line tool Net-SNMP for issuing SNMP queries to test all was well.
I opted for the basic installation and uncheck all the other options.
Open a new command prompt so that it picks up the PATH variable added during installation then run the following command

snmptranslate -IR -Td IF-MIB::linkDown

See the README.txt for the correct response but if you see no errors you are in good shape.

Next download SnmpTools Follow the instructions. I opted to install the 32bit version using the regagentWow6432.reg
Restart the Microsoft SNMP Service then run the command:
snmpget -v1 -c public localhost 1.3.6.1.4.1.15
If all is well you should see:
SNMPv2-SMI::enterprises.15 = STRING: “snmptools by erwan.l@free.fr”

That’s all for now but I will update this post again.

As Promised Part 2

I have made a little more progress accessing the MSMQ Performance counters

I have added the following two lines to the Counters.ini file and restarted the SNMP Service:

[1.3.6.1.4.1.15.5]

counter=MSMQ Queue\Messages in Queue\acerbotic\private$\distributordatabus

Now when I issue the following snmpget query from the command line:

snmpget -v1 -c public localhost 1.3.6.1.4.1.15.5

I see the response:

SNMPv2-SMI::enterprises.15.5 = INTEGER: 2

Thus indicating there are two messages in the private$\distributordatabus queue on my laptop.

The End Game

At time of writing it seems that in order to allow our SNMP monitoring software to access this OID I need to supply it with a MIB file.

The story continues…

I have found this page that talks about using a MIB editor to create such a file.

Conclusion

SNMP is a great way to monitor your application, but it involves a good deal of upfront investment if you don’t already have a developer on your team who is proficient. We don’t have such a developer so have decided to use the .Net framework to expose peformance counters and use WMI to monitor those counters. If the thresholds we set are exceeded we will get alerts.

SQL Server 2008 – Repeat Elements without a parent plural node

Posted by admin on May 21, 2010
Uncategorized / Comments Off
To Produce this: 
================
<ProductModelData ProductModelID="7" ProductModelName="..."
ProductIDs="product id list in the product model" >
<ProductName>...</ProductName>
<ProductName>...</ProductName>
...
</ProductModelData>

You need this:
==============

SELECT ProductModelID as "@ProductModelID",
Name as "@ProductModelName",
(SELECT ProductID as "data()"
FROM SalesLT.Product
WHERE SalesLT.Product.ProductModelID =
SalesLT.ProductModel.ProductModelID
FOR XML PATH ('')) as "@ProductIDs",
(SELECT Name as "ProductName"
FROM SalesLT.Product
WHERE SalesLT.Product.ProductModelID =
SalesLT.ProductModel.ProductModelID
FOR XML PATH (''), TYPE) as "ProductNames"
FROM SalesLT.ProductModel
WHERE ProductModelID= 7 or ProductModelID=9
FOR XML PATH('ProductModelData')

The key is the ", TYPE" after the "FOR XML PATH(''), the example on MSDN is missing this key component.