Blog
Introducing Training Buddy for Windows 8.1

Introducing Training Buddy for Windows 8.1

3 years ago I created Training Buddy for Windows Phone 7 purely because I was switching from iPhone and wanted to have decent sports tracker. As it was a new platform I figured I'd make it.

Since then the app has become more popular than I imagined. Earlier this year it was updated with a fresh new look and to take advantage of new features in Windows Phone 8 such as new live tile sizes and Nokia Maps. Training Buddy Free (the free reduced functionality version) was also updated to include support for Training Buddy Live so activities can be viewed and shared on the Training Buddy website.

The app has also received some amazing feedback. My favourite of which Jason wrote in the UK app store for Training Buddy Free:

Now 3 years on with Windows 8.1 launched I felt it was time Training Buddy got its own Windows 8 app allowing its users to view all their activity data on their desktop and tablet. This has always been possible through the website since the launch of Training Buddy Live, but an app opens the door to be more platform specific and easier to use offline without an internet connection and then sync at a later date. It also happens that I'm a big fan of apps over websites.

This is just the start though, over the next few months more and more features will be added, just as the phone app has continued to evolve over the last 3 years.

Download Training Buddy for Windows Phone 8.1

IIS Where are my log files?

This is one of those things that once you know is very very simple, but finding out can be very very annoying.

IIS by default will store a log file for each site that it runs. This gives you valuable details on each request to the site that can help when errors are being reported by users.

When you go searching for them your initial thought may be to go to IIS and look at the site you want the files for. There you will see an item called logging. Excellent you think, this will tell you all you need to know.

There's even a button saying "View Log File...", but once you click it you realise things aren't so simple. The link and folder path on the logging page both take you to a folder, containing more folders. In those folders are the logs, but there's a folder for each site in IIS and they've all got a weird name. How do you know which folder has the log files for the site you want?

Back on the IIS logging screen there's nothing to say which folder the files will be in. There isn't any indication anywhere.

The answer however is very easy. Each folder has the Site ID in its name. You can find the Site ID for your site in IIS either by looking at the sites list

or clicking on a site and clicking advanced settings

Creating 301 redirects in web.config

For various reasons at times you may need to create a 301 redirect to another URL. This could be as a result of a page moving or you just need to create some friendly URLS.

As a developer you may be tempted to do something like this in code...

1private void Page_Load(object sender, System.EventArgs e)
2{
3 Response.Status = "301 Moved Permanently";
4 Response.AddHeader("Location","http://www.new-url.com");
5}

But do you really want your project cluttered up with files who's only purpose is to redirect to another page!

You may also be tempted to try doing something with .NET's RouteCollection. This would certainly solve an issue on creating a redirect for anything without a file extension, but there is a better way.

In your web.config file under the configuration node create something like this

1<location path="twitter">
2 <system.webServer>
3 <httpRedirect enabled="true" destination="http://twitter.com/TwitterName" httpResponseStatus="Permanent" />
4 </system.webServer>
5</location>

The location path specifies that path on your site that this redirect will apply to. The destination value in the httpRedirect is where the redirect will go to. As well as setting Permanent for the httpResponseStatus you can also specify Found or Temporary depending on your needs.