Browsing posts in: Uncategorized

Azure trouble

During the last week I’ve discovered that the Azure hosting isn’t working very well. I’ve reported the problem to Azure. If you have had trouble accessing the site, please let me know.

I’m currently loosing about 1500 visitors every month due to an error in the PHP configuration at Azure.

You can track my progress in the azure forum


It’s been two weeks and the closest they got is asking for the PHP log. And that’s after me telling them what the problem is.

Again, do note that I’m using the WordPress image that they have configured and the PHP edition that they have selected. Still they make no real effort in finding the problem, despite that I’m a paying customer.

Hence I’m going to move both OneTrueError and my blog from Azure. Why use something where you can’t get help when it doesn’t work?

Using both signed versions of log4net

Older versions of log4net has been signed with a different certificate than the new versions of log4net. That means that they have different public tokens and regular <assemblyBinding> doesn’t work. This post will show you have you can use both versions side-by-side.

Continue Reading

Griffin Framework homepage

Griffin Framework just got a new homepage.

It’s still basic, but will continue to grow. I’ll also commit it in the “homepage” branch at github. Feel free to add improvements to it.

Simple command line parser

I have tried 3-4 different nuget packages for command line parsing. Didn’t figure out how to use them properly. Here is a small command line parser.

Usage example

Here is how I use it.

internal class Program
    private static void Main(string[] args)
        var parser = new SimpleCommandLineParser();

        if (parser.Arguments.ContainsKey("server"))
            var server = new LoadTestServer();
            Console.WriteLine("Server started");
        else if (parser.Arguments.ContainsKey("client"))
            var client = new LoadTestClient(parser.Arguments["client"][0]);
            Console.WriteLine("All enqueued");
            Console.WriteLine(" - Check the app.config for additional configuration options");
            Console.WriteLine("SharpMessaging.BenchmarkApp -server [port]");
            Console.WriteLine("SharpMessaging.BenchmarkApp -client [host:port]");

        Console.WriteLine("Press ENTER to quit");


And the actual code:

public class SimpleCommandLineParser
    public SimpleCommandLineParser()
        Arguments = new Dictionary<string, string[]>();

    public IDictionary<string, string[]> Arguments { get; private set; }

    public void Parse(string[] args)
        var currentName = "";
        var values = new List<string>();
        foreach (var arg in args)
            if (arg.StartsWith("-"))
                if (currentName != "")
                    Arguments[currentName] = values.ToArray();

                currentName = arg.Substring(1);
            else if (currentName == "")
                Arguments[arg] = new string[0];

        if (currentName != "")
            Arguments[currentName] = values.ToArray();

    public bool Contains(string name)
        return Arguments.ContainsKey(name);


The great thing is that .NET have already done an initial parse for you. You can for instance use quotes in it to get everything in the same argument:

someApplication "this is argv[0]"

My parser parses the following:

someApp -server 8344 arg2


Console.WriteLine(parser.Arguments["server"][0]); //8334
Console.WriteLine(parser.Arguments["server"][1]); //arg2

While this:

someApp server verbose

can be checked as:


i.e. strings that are specified before the first dash argument (“-arg”) will be considered to be an argument by itself.

Why I never will use bitcoins

I’ve followed the development of bitcoins for a while and I’ve from the start avoided to get involved (i.e. using bitcoins). I don’t think that there is anything wrong with bitcoin in itself. It’s a real awesome innovation. However, I don’t think that bitcoin will ever work in the real world. Here is why.

Continue Reading

Blog down time

Azure and PHP 5.5 didn’t seem to get along very much.

Got a lot of this in the log suddenly (without any modifications):

[07-Feb-2014 05:15:00 America/Los_Angeles] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\Program Files (x86)\PHP\v5.5\ext\php_sqlsrv.dll' - The specified module could not be found.
in Unknown on line 0
[07-Feb-2014 05:15:00 America/Los_Angeles] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\Program Files (x86)\PHP\v5.5\ext\php_pdo_sqlsrv.dll' - The specified module could not be found.
in Unknown on line 0

I’ve reverted to PHP 5.4 in the Azure Management web. All seems to work OK. Thumbs crossed.

Windows azure & WordPress

I had a minor down time due to a failing WordPress plugin update. I had to manually delete the failing plugins using the FTP account which is hidden inside the publish profile XML which you can download. Now I manually have to reinstall those plugins.