Skip to content

Mapping Operation War Diary


Interesting mashup colloboration!

Originally posted on Operation War Diary:

Tens of thousands of maps were produced by British forces during the first world war, from large-scale maps for senior commanders needing an overview of an entire front, to much more detailed topographical maps for front-line troops, which allowed them to accurately pinpoint enemy positions and establish the nature of the ground they held.

Many of these maps are preserved in the unit war diaries, with Citizen Historians uncovering more each day. One of the great benefits of tagging the war diaries is that it allows us to continue the mapping work carried out during the war itself, using modern techniques to establish a visual representation of the events of the time and the experiences of the units to whom the diaries belong


Image © IWM (Q 2306)

One way in which we can do this is to use place names, particularly those we can locate on the mapping tool…

View original 191 more words

How to allow ASP.NET MVC to be enabled on IIS6

Here is a extremely useful tip for allowing ASP.NET MVC to be used on IIS6 which was needed to be done on Friday.

Natively, IIS6 does not support ASP.NET MVC. In order to allow ASP.NET MVC to be enabled on IIS6, essentially you need to check the configuration mappings to have the .mvc extension inside the extension list.

You can check this by right clicking the specific application within the folder Web Sites.

- Go to Home Directory Tab

- Click on Configuration button

- There you see the list od Application Extensions with the extension name, executable path, and verbs that are supported.

- If you do not see .mvc in the extension column, you can add this by clicking the Add button.

- Inside the Add/Edit Application Extension Mapping window.

- On Executable, type in C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll

- On Extension, type in .mvc

- On Verbs, type in GET,HEAD,POST,DEBUG

- Click OK

Finally test that ASP.NET MVC works on the published site and it should work.

How to embed video into an ASPX page

Someone on ASP.NET forums if you can embed HTML5 videos into an ASP.NET ASPX page. 

The simple answer I gave is yes as long as IIS supports the correct file type for HTML5 videos.

See my answer below: – 

Its most probably that IIS has not been configured with the correct MIME types like OGG.

See this page for details on how to configure IIS to allow these MIME types.

On the local host you also need the MIME types are set up in your .htaccess file. You may need to add the following to enable .ogv

AddType video/ogg .ogv

Gradient not working in Safari Browser

The other day my colleague discovered that some of the gradients applied to a JQuery Mobile button were not working on the Safari Web Browser at all. After researching this, according to the official Apple Developer web page it states: –

Note: Recent drafts of the W3C proposal have simplified the syntax. This chapter describes the most recent implementation shipping in Safari. You should expect Safari’s syntax for gradients to continue to change as the W3C standard evolves. While new syntax is expected, the existing syntax—and prior syntax—should still work.

The -webkit-linear-gradient and webkit-radial-gradient properties require iOS 5.0 or later, or Safari 5.1 or later on the desktop. If you need to support earlier releases of iOS or Safari, see “Prior Syntax (-webkit-gradient).”


To fix this for my CSS styling, you just need to add the following to apply the gradients to the JQuery Mobile button like so: –

.ui-page-theme-a .ui-bar-inherit.ui-header {
background: #084596;
background-image: -webkit-linear-gradient(top, #084596, #3165CA);
background-image: -moz-linear-gradient(top, #084596, #3165CA);
background-image: -o-linear-gradient(top, #084596, #3165CA);
background-image: linear-gradient(to bottom, #084596, #3165CA);

See the first line of background-image, this should fix the problem for Safari. Never was a fan of Safari!

Request format is unrecognized for URL unexpectedly ending in …

If you receive the following error when calling a web service you created as followsRequest format is unrecognized for URL unexpectedly ending in” , the likely reason is that you have configured the web service to work in AJAX/JSON but not for the traditional http post and get, so to amend this, you simply add the following tags in the web.config file.

            <add name="HttpGet"/>
            <add name="HttpPost"/>

Converting a DateTime Field in SQL to NVARCHAR

Because MS SQL doesn’t automatically convert a DateTime field in a useful format in CSV. A useful solution to get around this is to use this function SELECT CONVERT(VARCHAR(20), GETDATE(), 100). It converts a datetime field in the format  Mon DD YYYY 1
HH:MIAM (or PM) e.g. Jan 1 2005 1:29PM 1

1 To make the month name in upper case, simply use the UPPER string function.

You can do this for a data column like so SELECT CONVERT(VARCHAR(20), [ColumnName], 100)

Hope that helps!


How to export comma delimited data to csv including commas in the data

I have been meaning to write this post for a long while so here is a very good short tip on how to do this.

If you wanted an automated script to export data from a database onto a CSV file, you can easily do this with the built in SQL Server Command – sqlcmd in the command prompt. I usually write the export as follows : -

SQLCMD -S DB-SERVER -E -Q "set nocount on; set ansi_warnings off; SELECT [Column1] As TextHere, [Column2] As NormalColumn FROM [Database].[dbo].[Table]" /o output.tmp /s "," -W

The second command converts the tmp file to csv

type output.tmp | findstr /V \-\,\- > output.csv

However, the problem lies in that if you have a comma (,) in any of the columns in the data, the sqlcmd will still take into account that comma as a delimiter and would split that data into two, for example if the address column had a column, it would split the address into two columns! Not exactly what we want. After reading StackOverflow on a few forum discussiosn, the solution was to convert the column containing the comma to varchar(MAX) – as a string with inverted comma quotes surrounding the outside. My thinking is to easily append those either side of the string and cast it as a nvarchar(MAX). The results were that it worked perfectly! Here is the solution: –

SQLCMD -S DB-SERVER -E -Q "set nocount on; set ansi_warnings off; SELECT '""' + cast ([Column1] as nvarchar(max)) + '""' As TextHere, [Column2] As NormalColumn FROM [Database].[dbo].[Table]" /o output.tmp /s "," -W

The key thing is that /s "," sets the column seperator to ,



Get every new post delivered to your Inbox.

Join 422 other followers