This is a preview version of Cyotek's blog and may be missing functionality and/or unstable. Please visit for the current version of the blog.
If you encounter any problems using this preview site, please contact us with the details.

Using the MantisBT REST API when hosted on IIS

mantisbt iis https redirect 0 Comments

I'm currently in the process of moving our hosting services from one provider to another; although some parts of infrastructure runs on Microsoft Azure, a fair chunk uses more traditional hosting. Our MantisBT instance is one such service that I recently migrated.

Previously the instance was hosted on Linux, now it's on Windows. The initial migration seemed to have gone well and so I'd moved onto the next sub-domain on the list.

Read More

Updating AssemblyInfo.cs version information via batch file

c# jenkins teamcity assemblyinfo sed 0 Comments

Over a year ago I wrote how to build and publish NuGet packages via Jenkins in which I stated I would follow up with another article on modifying AssemblyInfo.cs via a batch file. Of course, I forgot to write that post. Recently I was adding a NuGet publish job to a TeamCity server which reminded me and therefore finally here is the article.

While both Jenkins and TeamCity include or have available plugins for updating AssemblyInfo.cs, they both suffer from the problem in that they can write a version into the file but they can't read from it first to derive a new value. However, if you simply want to set a full version from within either CI tool you can without having to bother with anything in this post. As I wish to combine part of the existing version with a CI supplied value, I need to look at alternatives.

Read More

Tools we use - 2017 edition

tools 0 Comments

Happy New Year! Once again it's that time for the list of software products I used throughout the past year. Although there's a fair few new entries, overall there's not a huge amount of change given Cyotek's current technology focus.

(This list has grown over time and could probably do with some form of better grouping and ordering. For now, categories are fairly ad-hoc and nothing is in any particular order)

Read More

Reading and writing 18-bit RGB VGA Palette (pal) files with C#

c# rgb color palette 18-bit 24-bit westwood dos 6-bit 8-bit 1 Comments Downloads

18-bit RGB palettes are an old format used by VGA displays of yesteryear (although interestingly Wikipedia states they are still used by many LCD monitors). These palettes use 6-bits for each of the red, green and blue channels and usually allowed a maximum of 256 colours from the 262,144 unique colours available.

Files using this format are usually quite recognisable, having the extension pal and a size of 768 bytes.

Read More

Redirecting to HTTPS when using IIS behind a load balancer iis https redirect 1 Comments

Cyotek has a number of different websites powering various bits of our software and services. Some are Windows based using IIS, and some are Linux based using Apache. Internal servers are are directly accessed but external servers are behind load balancers. Almost all are using HTTPS now and have redirects in place to force the use of HTTPS over HTTP.

There are plenty of articles on the internet dealing how to use .htaccess files to perform redirects using Apache, and various articles on different methods of redirecting IIS or ASP.NET applications. However, there seems to be a slight gap when it comes to load balancers or reverse proxies. Depending on how the load balancer / reverse proxy (referred to as just load balancer for the rest of the article) operates, the secure connection may terminate at the load balancer, and so the web server ...

Read More

Installing the URL Rewrite module into Internet Information Services

iis rewrite web platform installer 0 Comments

For quite some time now Internet Information Services (IIS) has had an URL Rewriter component that you can optionally install. As one of my upcoming shorter posts mentions the use of it, I thought I'd better provide installation instructions separately rather than cluttering up that post.

Some versions of Internet Information Services Manager (IIS Manager) have a Start Page, as demonstrated in the below screenshot. All instructions on this post assume that on opening IIS Manager the user has selected the root server node in the tree if it wasn't already selected.

Read More

Upload data to blob storage with Azure Functions

c# azure blob 2 Comments

Some time ago I used a third party product which accepted data from client applications via a HTTP WCF service and saved this data as files on the local disk. A Windows service would then periodically poll for new files and load the data into a SQL Server database. This worked, as long as both the HTTP server and the loader service were on the same computer/network. As this wasn't suitable for my needs, the software vendor provided me with the source code for the WCF service and I modified this to store the...

Read More

Arranging items radially around a central point using C#

c# math diagram trigonometry 1 Comments Downloads

Recently I was looking for a way of display hierarchical information in a more compact form than the previous horizontal/vertical trees I was using. One of the concepts I looked into during this was the idea of arranging children radially around a central node.

This post discusses the sample project I created to explore the first part of this concept.

Read More

Painting animated images using C#

c# image animate 0 Comments Downloads

While reviewing The C# Top 100 it occurred to me that in my own code base I have many bits of code which may make useful blog posts, and that shouldn't take as long to write as the ones I usually create. Plus, I've a fair amount of source code for extending built in controls in various ways, creating new controls from scratch and other useful library code - I need to explore ways of decoupling some of that and releasing it for anyone to use.

To get started with this idea is a simple article on painting animated images using C#. If you assign an animated GIF file to the Image property of a Control, the .NET Framework will take care of animating the image for you. However, it only provides this automatically for the Image property and not for other properties such as BackgroundImage, or any custom image properties you add to your own components.

Read More

Book Review: The C# Helper Top 100

c# review book 0 Comments

Almost 20 years ago after finishing a training scheme I was hired for my first permanent role. After getting paid for the first time I immediately rushed off to the bookshop to buy myself a programming book. The selection of books in my chosen language of the time (Visual Basic (not .NET!)) wasn't large, but in the end I bought Rod Stephens Custom Controls Library, which still graces my technical bookshelves even now. Since then I've bought many computing books, but I couldn't tell you the ...

Read More